net.minecraft.block

public class ShelfBlock

extends BlockWithEntity implements InteractibleSlotContainer, SideChaining, Waterloggable

All mapped superinterfaces:

ToggleableFeature, ItemConvertible, BlockEntityProvider, InteractibleSlotContainer, SideChaining, Waterloggable, FluidDrainable, FluidFillable

net.minecraft.world.level.block.ShelfBlock
net.minecraft.class_11586
net.minecraft.block.ShelfBlock

Field summary

Modifier and TypeField
public static final BooleanProperty
POWERED
field_61424
POWERED
public static final EnumProperty<Direction>
FACING
field_61425
FACING
public static final EnumProperty<SideChainPart>
SIDE_CHAIN_PART
field_61426
SIDE_CHAIN
public static final BooleanProperty
WATERLOGGED
field_61427
WATERLOGGED
private static final Map<Direction, VoxelShape>
SHAPES
field_61428
SHAPES

Constructor summary

ModifierConstructor
public (AbstractBlock$Settings properties)

Method summary

Modifier and TypeMethod
protected VoxelShape
getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
method_9530(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getOutlineShape(BlockState arg0, BlockView arg1, BlockPos arg2, ShapeContext arg3)
protected boolean
useShapeForLightOcclusion(BlockState state)
method_9526(class_2680 arg0)
hasSidedTransparency(BlockState arg0)
protected boolean
isPathfindable(BlockState state, PathComputationType type)
method_9516(class_2680 arg0, class_10 arg1)
canPathfindThrough(BlockState arg0, NavigationType arg1)
public BlockEntity
newBlockEntity(BlockPos worldPosition, BlockState blockState)
method_10123(class_2338 arg0, class_2680 arg1)
createBlockEntity(BlockPos arg0, BlockState arg1)
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)
protected void
affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston)
method_66388(class_2680 arg0, class_3218 arg1, class_2338 arg2, boolean arg3)
onStateReplaced(BlockState arg0, ServerWorld arg1, BlockPos arg2, boolean arg3)
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)
public BlockState
getStateForPlacement(BlockPlaceContext context)
method_9605(class_1750 arg0)
getPlacementState(ItemPlacementContext arg0)
public BlockState
rotate(BlockState state, Rotation rotation)
method_9598(class_2680 arg0, class_2470 arg1)
rotate(BlockState arg0, BlockRotation arg1)
public BlockState
mirror(BlockState state, Mirror mirror)
method_9569(class_2680 arg0, class_2415 arg1)
mirror(BlockState arg0, BlockMirror arg1)
public int
getRows()
method_72586()
getRows()
public int
getColumns()
method_72587()
getColumns()
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)
private static boolean
swapSingleItem(ItemStack itemStack, Player player, ShelfBlockEntity shelfBlockEntity, int hitSlot, Inventory inventory)
method_72614(class_1799 arg0, class_1657 arg1, class_11597 arg2, int arg3, class_1661 arg4)
swapSingleStack(ItemStack stack, PlayerEntity player, ShelfBlockEntity blockEntity, int hitSlot, PlayerInventory playerInventory)
private boolean
swapHotbar(Level level, BlockPos pos, Inventory inventory)
method_72615(class_1937 arg0, class_2338 arg1, class_1661 arg2)
swapAllStacks(World world, BlockPos pos, PlayerInventory playerInventory)
public SideChainPart
getSideChainPart(BlockState state)
method_72619(class_2680 arg0)
getSideChainPart(BlockState arg0)
public BlockState
setSideChainPart(BlockState state, SideChainPart newPart)
method_72617(class_2680 arg0, class_11598 arg1)
withSideChainPart(BlockState arg0, SideChainPart arg1)
public Direction
getFacing(BlockState state)
method_72620(class_2680 arg0)
getFacing(BlockState arg0)
public boolean
isConnectable(BlockState state)
method_72621(class_2680 arg0)
canChainWith(BlockState arg0)
public int
getMaxChainLength()
method_72618()
getMaxSideChainLength()
protected void
onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston)
method_9615(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2680 arg3, boolean arg4)
onBlockAdded(BlockState arg0, World arg1, BlockPos arg2, BlockState arg3, boolean arg4)
private void
playSound(LevelAccessor level, BlockPos pos, SoundEvent sound)
method_72616(class_1936 arg0, class_2338 arg1, class_3414 arg2)
playSound(WorldAccess world, BlockPos pos, SoundEvent sound)
protected FluidState
getFluidState(BlockState state)
method_9545(class_2680 arg0)
getFluidState(BlockState 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 boolean
hasAnalogOutputSignal(BlockState state)
method_9498(class_2680 arg0)
hasComparatorOutput(BlockState arg0)
protected int
getAnalogOutputSignal(BlockState state, Level level, BlockPos pos, Direction direction)
method_9572(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2350 arg3)
getComparatorOutput(BlockState arg0, World arg1, BlockPos arg2, Direction arg3)