net.minecraft.block

public class NoteBlock

extends Block

All mapped superinterfaces:

ToggleableFeature, ItemConvertible

net.minecraft.world.level.block.NoteBlock
net.minecraft.class_2428
net.minecraft.block.NoteBlock

Field summary

Modifier and TypeField
public static final com.mojang.serialization.MapCodec<NoteBlock>
CODEC
field_46405
CODEC
public static final EnumProperty<NoteBlockInstrument>
INSTRUMENT
field_11325
INSTRUMENT
public static final BooleanProperty
POWERED
field_11326
POWERED
public static final IntProperty
NOTE
field_11324
NOTE
public static final int
NOTE_VOLUME
field_41678
field_41678

Constructor summary

ModifierConstructor
public (AbstractBlock$Settings properties)

Method summary

Modifier and TypeMethod
public com.mojang.serialization.MapCodec<NoteBlock>
codec()
method_53969()
getCodec()
private BlockState
setInstrument(LevelReader level, BlockPos position, BlockState state)
method_47583(class_4538 arg0, class_2338 arg1, class_2680 arg2)
getStateWithInstrument(WorldView world, BlockPos pos, BlockState state)
public BlockState
getStateForPlacement(BlockPlaceContext context)
method_9605(class_1750 arg0)
getPlacementState(ItemPlacementContext arg0)
protected BlockState
updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random)
method_9559(class_2680 arg0, class_4538 arg1, class_10225 arg2, class_2338 arg3, class_2350 arg4, class_2338 arg5, class_2680 arg6, class_5819 arg7)
getStateForNeighborUpdate(BlockState arg0, WorldView arg1, ScheduledTickView arg2, BlockPos arg3, Direction arg4, BlockPos arg5, BlockState arg6, Random arg7)
protected void
neighborChanged(BlockState state, Level level, BlockPos pos, Block block, Orientation orientation, boolean movedByPiston)
method_9612(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2248 arg3, class_9904 arg4, boolean arg5)
neighborUpdate(BlockState arg0, World arg1, BlockPos arg2, Block arg3, WireOrientation arg4, boolean arg5)
private void
playNote(Entity source, BlockState state, Level level, BlockPos pos)
method_10367(class_1297 arg0, class_2680 arg1, class_1937 arg2, class_2338 arg3)
playNote(Entity entity, BlockState state, World world, BlockPos pos)
protected ActionResult
useItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult)
method_55765(class_1799 arg0, class_2680 arg1, class_1937 arg2, class_2338 arg3, class_1657 arg4, class_1268 arg5, class_3965 arg6)
onUseWithItem(ItemStack arg0, BlockState arg1, World arg2, BlockPos arg3, PlayerEntity arg4, Hand arg5, BlockHitResult arg6)
protected ActionResult
useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult)
method_55766(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3, class_3965 arg4)
onUse(BlockState arg0, World arg1, BlockPos arg2, PlayerEntity arg3, BlockHitResult arg4)
protected void
attack(BlockState state, Level level, BlockPos pos, Player player)
method_9606(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3)
onBlockBreakStart(BlockState arg0, World arg1, BlockPos arg2, PlayerEntity arg3)
public static float
getPitchFromNote(int twoOctaveRangeNote)
method_49818(int arg0)
getNotePitch(int note)
protected boolean
triggerEvent(BlockState state, Level level, BlockPos pos, int b0, int b1)
method_9592(class_2680 arg0, class_1937 arg1, class_2338 arg2, int arg3, int arg4)
onSyncedBlockEvent(BlockState arg0, World arg1, BlockPos arg2, int arg3, int arg4)
private Identifier
getCustomSoundId(Level level, BlockPos pos)
method_47886(class_1937 arg0, class_2338 arg1)
getCustomSound(World world, BlockPos pos)
protected void
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> builder)
method_9515(class_2689$class_2690<class_2248, class_2680> arg0)
appendProperties(StateManager$Builder<Block, BlockState> arg0)