net.minecraft.block

public class LeverBlock

extends WallMountedBlock

All mapped superinterfaces:

ToggleableFeature, ItemConvertible

net.minecraft.world.level.block.LeverBlock
net.minecraft.world.level.block.LeverBlock
net.minecraft.class_2401
net.minecraft.block.LeverBlock

Field summary

Modifier and TypeField
public static final com.mojang.serialization.MapCodec<LeverBlock>
CODEC
CODEC
field_46387
CODEC
public static final BooleanProperty
POWERED
POWERED
field_11265
POWERED
private final Function<BlockState, VoxelShape>
shapes
shapes
field_55776
shapeFunction

Constructor summary

ModifierConstructor
protected (AbstractBlock$Settings properties)

Method summary

Modifier and TypeMethod
public com.mojang.serialization.MapCodec<LeverBlock>
codec()
codec()
method_53969()
getCodec()
private Function<BlockState, VoxelShape>
makeShapes()
makeShapes()
method_66447()
createShapeFunction()
protected VoxelShape
getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
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 ActionResult
useWithoutItem(BlockState stateBefore, Level level, BlockPos pos, Player player, BlockHitResult hitResult)
useWithoutItem(BlockState stateBefore, 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
onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> onHit)
onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> onHit)
method_55124(class_2680 arg0, class_3218 arg1, class_2338 arg2, class_1927 arg3, BiConsumer<class_1799, class_2338> arg4)
onExploded(BlockState arg0, ServerWorld arg1, BlockPos arg2, Explosion arg3, BiConsumer<ItemStack, BlockPos> arg4)
public void
pull(BlockState state, Level level, BlockPos pos, Player player)
pull(BlockState state, Level level, BlockPos pos, Player player)
method_21846(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3)
togglePower(BlockState state, World world, BlockPos pos, PlayerEntity player)
protected static void
playSound(Player player, LevelAccessor level, BlockPos pos, BlockState stateAfter)
playSound(Player player, LevelAccessor level, BlockPos pos, BlockState stateAfter)
method_60283(class_1657 arg0, class_1936 arg1, class_2338 arg2, class_2680 arg3)
playClickSound(PlayerEntity player, WorldAccess world, BlockPos pos, BlockState state)
private static void
makeParticle(BlockState state, LevelAccessor level, BlockPos pos, float scale)
makeParticle(BlockState state, LevelAccessor level, BlockPos pos, float scale)
method_10308(class_2680 arg0, class_1936 arg1, class_2338 arg2, float arg3)
spawnParticles(BlockState state, WorldAccess world, BlockPos pos, float alpha)
public void
animateTick(BlockState state, Level level, BlockPos pos, RandomSource random)
animateTick(BlockState state, Level level, BlockPos pos, RandomSource random)
method_9496(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_5819 arg3)
randomDisplayTick(BlockState arg0, World arg1, BlockPos arg2, Random arg3)
protected void
affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston)
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 int
getSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction)
getSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction)
method_9524(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_2350 arg3)
getWeakRedstonePower(BlockState arg0, BlockView arg1, BlockPos arg2, Direction arg3)
protected int
getDirectSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction)
getDirectSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction)
method_9603(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_2350 arg3)
getStrongRedstonePower(BlockState arg0, BlockView arg1, BlockPos arg2, Direction arg3)
protected boolean
isSignalSource(BlockState state)
isSignalSource(BlockState state)
method_9506(class_2680 arg0)
emitsRedstonePower(BlockState arg0)
private void
updateNeighbours(BlockState state, Level level, BlockPos pos)
updateNeighbours(BlockState state, Level level, BlockPos pos)
method_10309(class_2680 arg0, class_1937 arg1, class_2338 arg2)
updateNeighbors(BlockState state, World world, BlockPos pos)
protected void
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> builder)
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> builder)
method_9515(class_2689$class_2690<class_2248, class_2680> arg0)
appendProperties(StateManager$Builder<Block, BlockState> arg0)