Package net.minecraft.block
Class LeverBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.HorizontalFacingBlock
net.minecraft.block.WallMountedBlock
net.minecraft.block.LeverBlock
- All Implemented Interfaces:
ItemConvertible
- Mappings:
Namespace Name official cnbintermediary net/minecraft/class_2401named net/minecraft/block/LeverBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final intprotected static final intprotected static final intprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapestatic final BooleanPropertyprotected static final VoxelShapeprotected static final VoxelShapeFields inherited from class net.minecraft.block.WallMountedBlock
FACEFields inherited from class net.minecraft.block.HorizontalFacingBlock
FACINGFields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, SKIP_LIGHTING_UPDATES, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) booleanemitsRedstonePower(BlockState state) getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) intgetStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) intgetWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) voidonStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)ifnewStateis different fromstate.onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.voidrandomDisplayTick(BlockState state, World world, BlockPos pos, Random random) private static voidspawnParticles(BlockState state, WorldAccess world, BlockPos pos, float alpha) togglePower(BlockState state, World world, BlockPos pos) private voidupdateNeighbors(BlockState state, World world, BlockPos pos) Methods inherited from class net.minecraft.block.WallMountedBlock
canPlaceAt, canPlaceAt, getDirection, getPlacementState, getStateForNeighborUpdateMethods inherited from class net.minecraft.block.HorizontalFacingBlock
mirror, rotateMethods inherited from class net.minecraft.block.Block
afterBreak, appendStacks, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getVerticalModelOffsetMultiplier, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, prepare, randomTick, scheduledTick
-
Field Details
-
POWERED
- Mappings:
Namespace Name Mixin selector official aLcnb;a:Lcvk;intermediary field_11265Lnet/minecraft/class_2401;field_11265:Lnet/minecraft/class_2746;named POWEREDLnet/minecraft/block/LeverBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
-
field_31184
protected static final int field_31184- See Also:
- Mappings:
Namespace Name Mixin selector official bLcnb;b:Iintermediary field_31184Lnet/minecraft/class_2401;field_31184:Inamed field_31184Lnet/minecraft/block/LeverBlock;field_31184:I
-
field_31185
protected static final int field_31185- See Also:
- Mappings:
Namespace Name Mixin selector official cLcnb;c:Iintermediary field_31185Lnet/minecraft/class_2401;field_31185:Inamed field_31185Lnet/minecraft/block/LeverBlock;field_31185:I
-
field_31186
protected static final int field_31186- See Also:
- Mappings:
Namespace Name Mixin selector official dLcnb;d:Iintermediary field_31186Lnet/minecraft/class_2401;field_31186:Inamed field_31186Lnet/minecraft/block/LeverBlock;field_31186:I
-
NORTH_WALL_SHAPE
- Mappings:
Namespace Name Mixin selector official eLcnb;e:Ldwo;intermediary field_11267Lnet/minecraft/class_2401;field_11267:Lnet/minecraft/class_265;named NORTH_WALL_SHAPELnet/minecraft/block/LeverBlock;NORTH_WALL_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
SOUTH_WALL_SHAPE
- Mappings:
Namespace Name Mixin selector official fLcnb;f:Ldwo;intermediary field_11263Lnet/minecraft/class_2401;field_11263:Lnet/minecraft/class_265;named SOUTH_WALL_SHAPELnet/minecraft/block/LeverBlock;SOUTH_WALL_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
WEST_WALL_SHAPE
- Mappings:
Namespace Name Mixin selector official gLcnb;g:Ldwo;intermediary field_11260Lnet/minecraft/class_2401;field_11260:Lnet/minecraft/class_265;named WEST_WALL_SHAPELnet/minecraft/block/LeverBlock;WEST_WALL_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EAST_WALL_SHAPE
- Mappings:
Namespace Name Mixin selector official hLcnb;h:Ldwo;intermediary field_11262Lnet/minecraft/class_2401;field_11262:Lnet/minecraft/class_265;named EAST_WALL_SHAPELnet/minecraft/block/LeverBlock;EAST_WALL_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
FLOOR_Z_AXIS_SHAPE
- Mappings:
Namespace Name Mixin selector official iLcnb;i:Ldwo;intermediary field_11264Lnet/minecraft/class_2401;field_11264:Lnet/minecraft/class_265;named FLOOR_Z_AXIS_SHAPELnet/minecraft/block/LeverBlock;FLOOR_Z_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
FLOOR_X_AXIS_SHAPE
- Mappings:
Namespace Name Mixin selector official jLcnb;j:Ldwo;intermediary field_11261Lnet/minecraft/class_2401;field_11261:Lnet/minecraft/class_265;named FLOOR_X_AXIS_SHAPELnet/minecraft/block/LeverBlock;FLOOR_X_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
CEILING_Z_AXIS_SHAPE
- Mappings:
Namespace Name Mixin selector official kLcnb;k:Ldwo;intermediary field_11268Lnet/minecraft/class_2401;field_11268:Lnet/minecraft/class_265;named CEILING_Z_AXIS_SHAPELnet/minecraft/block/LeverBlock;CEILING_Z_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
CEILING_X_AXIS_SHAPE
- Mappings:
Namespace Name Mixin selector official lLcnb;l:Ldwo;intermediary field_11266Lnet/minecraft/class_2401;field_11266:Lnet/minecraft/class_265;named CEILING_X_AXIS_SHAPELnet/minecraft/block/LeverBlock;CEILING_X_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
-
Constructor Details
-
LeverBlock
- Mappings:
Namespace Name Mixin selector official <init>Lcus;<init>(Lcus$c;)Vintermediary <init>Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcus;a(Lcut;Lcfi;Lgt;Ldwa;)Ldwo;intermediary method_9530Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;named getOutlineShapeLnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player. This, by default, is bound to using the right mouse button.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
world.isClient().If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
- Overrides:
onUsein classAbstractBlock- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
Namespace Name Mixin selector official aLcus;a(Lcut;Lcgc;Lgt;Lbth;Lazn;Ldvr;)Lazo;intermediary method_9534Lnet/minecraft/class_4970;method_9534(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;named onUseLnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
-
togglePower
- Mappings:
Namespace Name Mixin selector official dLcnb;d(Lcut;Lcgc;Lgt;)Lcut;intermediary method_21846Lnet/minecraft/class_2401;method_21846(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;named togglePowerLnet/minecraft/block/LeverBlock;togglePower(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
-
spawnParticles
- Mappings:
Namespace Name Mixin selector official aLcnb;a(Lcut;Lcgd;Lgt;F)Vintermediary method_10308Lnet/minecraft/class_2401;method_10308(Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;F)Vnamed spawnParticlesLnet/minecraft/block/LeverBlock;spawnParticles(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;F)V
-
randomDisplayTick
- Overrides:
randomDisplayTickin classBlock- Mappings:
Namespace Name Mixin selector official aLciy;a(Lcut;Lcgc;Lgt;Lalu;)Vintermediary method_9496Lnet/minecraft/class_2248;method_9496(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Vnamed randomDisplayTickLnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)ifnewStateis different fromstate. Vanilla blocks perform removal cleanups here.- Overrides:
onStateReplacedin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcus;a(Lcut;Lcgc;Lgt;Lcut;Z)Vintermediary method_9536Lnet/minecraft/class_4970;method_9536(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Vnamed onStateReplacedLnet/minecraft/block/AbstractBlock;onStateReplaced(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V
-
getWeakRedstonePower
public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) - Overrides:
getWeakRedstonePowerin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLcus;a(Lcut;Lcfi;Lgt;Lgy;)Iintermediary method_9524Lnet/minecraft/class_4970;method_9524(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)Inamed getWeakRedstonePowerLnet/minecraft/block/AbstractBlock;getWeakRedstonePower(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)I
-
getStrongRedstonePower
public int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) - Overrides:
getStrongRedstonePowerin classAbstractBlock- Mappings:
Namespace Name Mixin selector official bLcus;b(Lcut;Lcfi;Lgt;Lgy;)Iintermediary method_9603Lnet/minecraft/class_4970;method_9603(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)Inamed getStrongRedstonePowerLnet/minecraft/block/AbstractBlock;getStrongRedstonePower(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)I
-
emitsRedstonePower
- Overrides:
emitsRedstonePowerin classAbstractBlock- Mappings:
Namespace Name Mixin selector official f_Lcus;f_(Lcut;)Zintermediary method_9506Lnet/minecraft/class_4970;method_9506(Lnet/minecraft/class_2680;)Znamed emitsRedstonePowerLnet/minecraft/block/AbstractBlock;emitsRedstonePower(Lnet/minecraft/block/BlockState;)Z
-
updateNeighbors
- Mappings:
Namespace Name Mixin selector official eLcnb;e(Lcut;Lcgc;Lgt;)Vintermediary method_10309Lnet/minecraft/class_2401;method_10309(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Vnamed updateNeighborsLnet/minecraft/block/LeverBlock;updateNeighbors(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
appendProperties
- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector official aLciy;a(Lcuu$a;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vnamed appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-