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
public class LeverBlock extends WallMountedBlock
- Mappings:
Namespace Name official cau
intermediary net/minecraft/class_2401
named net/minecraft/block/LeverBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields Modifier and Type Field Description protected static VoxelShape
CEILING_X_AXIS_SHAPE
protected static VoxelShape
CEILING_Z_AXIS_SHAPE
protected static VoxelShape
EAST_WALL_SHAPE
protected static VoxelShape
FLOOR_X_AXIS_SHAPE
protected static VoxelShape
FLOOR_Z_AXIS_SHAPE
protected static VoxelShape
NORTH_WALL_SHAPE
static BooleanProperty
POWERED
protected static VoxelShape
SOUTH_WALL_SHAPE
protected static VoxelShape
WEST_WALL_SHAPE
Fields inherited from class net.minecraft.block.WallMountedBlock
FACE
Fields inherited from class net.minecraft.block.HorizontalFacingBlock
FACING
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Modifier Constructor Description protected
LeverBlock(AbstractBlock.Settings settings)
-
Method Summary
Methods inherited from class net.minecraft.block.WallMountedBlock
canPlaceAt, canPlaceAt, getDirection, getPlacementState, getStateForNeighborUpdate
Methods inherited from class net.minecraft.block.HorizontalFacingBlock
mirror, rotate
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, method_33614, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getVisualShape, hasComparatorOutput, hasSidedTransparency, isSideInvisible, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, prepare, randomTick, scheduledTick
-
Field Details
-
POWERED
- Mappings:
Namespace Name Mixin selector official a
Lcau;a:Lcik;
intermediary field_11265
Lnet/minecraft/class_2401;field_11265:Lnet/minecraft/class_2746;
named POWERED
Lnet/minecraft/block/LeverBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
-
NORTH_WALL_SHAPE
- Mappings:
Namespace Name Mixin selector official b
Lcau;b:Ldjn;
intermediary field_11267
Lnet/minecraft/class_2401;field_11267:Lnet/minecraft/class_265;
named NORTH_WALL_SHAPE
Lnet/minecraft/block/LeverBlock;NORTH_WALL_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
SOUTH_WALL_SHAPE
- Mappings:
Namespace Name Mixin selector official c
Lcau;c:Ldjn;
intermediary field_11263
Lnet/minecraft/class_2401;field_11263:Lnet/minecraft/class_265;
named SOUTH_WALL_SHAPE
Lnet/minecraft/block/LeverBlock;SOUTH_WALL_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
WEST_WALL_SHAPE
- Mappings:
Namespace Name Mixin selector official d
Lcau;d:Ldjn;
intermediary field_11260
Lnet/minecraft/class_2401;field_11260:Lnet/minecraft/class_265;
named WEST_WALL_SHAPE
Lnet/minecraft/block/LeverBlock;WEST_WALL_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EAST_WALL_SHAPE
- Mappings:
Namespace Name Mixin selector official e
Lcau;e:Ldjn;
intermediary field_11262
Lnet/minecraft/class_2401;field_11262:Lnet/minecraft/class_265;
named EAST_WALL_SHAPE
Lnet/minecraft/block/LeverBlock;EAST_WALL_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
FLOOR_Z_AXIS_SHAPE
- Mappings:
Namespace Name Mixin selector official f
Lcau;f:Ldjn;
intermediary field_11264
Lnet/minecraft/class_2401;field_11264:Lnet/minecraft/class_265;
named FLOOR_Z_AXIS_SHAPE
Lnet/minecraft/block/LeverBlock;FLOOR_Z_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
FLOOR_X_AXIS_SHAPE
- Mappings:
Namespace Name Mixin selector official g
Lcau;g:Ldjn;
intermediary field_11261
Lnet/minecraft/class_2401;field_11261:Lnet/minecraft/class_265;
named FLOOR_X_AXIS_SHAPE
Lnet/minecraft/block/LeverBlock;FLOOR_X_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
CEILING_Z_AXIS_SHAPE
- Mappings:
Namespace Name Mixin selector official h
Lcau;h:Ldjn;
intermediary field_11268
Lnet/minecraft/class_2401;field_11268:Lnet/minecraft/class_265;
named CEILING_Z_AXIS_SHAPE
Lnet/minecraft/block/LeverBlock;CEILING_Z_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
CEILING_X_AXIS_SHAPE
- Mappings:
Namespace Name Mixin selector official i
Lcau;i:Ldjn;
intermediary field_11266
Lnet/minecraft/class_2401;field_11266:Lnet/minecraft/class_265;
named CEILING_X_AXIS_SHAPE
Lnet/minecraft/block/LeverBlock;CEILING_X_AXIS_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
-
Constructor Details
-
LeverBlock
- Mappings:
Namespace Name Mixin selector official <init>
Lchs;<init>(Lchs$c;)V
intermediary <init>
Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V
named <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:
getOutlineShape
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbsz;Lfx;Ldiz;)Ldjn;
intermediary method_9530
Lnet/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 getOutlineShape
Lnet/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:
onUse
in classAbstractBlock
- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbtv;Lfx;Lbhl;Lapp;Ldiq;)Lapq;
intermediary method_9534
Lnet/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 onUse
Lnet/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 d
Lcau;d(Lcht;Lbtv;Lfx;)Lcht;
intermediary method_21846
Lnet/minecraft/class_2401;method_21846(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;
named togglePower
Lnet/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 a
Lcau;a(Lcht;Lbtw;Lfx;F)V
intermediary method_10308
Lnet/minecraft/class_2401;method_10308(Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;F)V
named spawnParticles
Lnet/minecraft/block/LeverBlock;spawnParticles(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;F)V
-
randomDisplayTick
@Environment(CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)- Overrides:
randomDisplayTick
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lbwu;a(Lcht;Lbtv;Lfx;Ljava/util/Random;)V
intermediary method_9496
Lnet/minecraft/class_2248;method_9496(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Ljava/util/Random;)V
named randomDisplayTick
Lnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Ljava/util/Random;)V
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)
ifnewState
is different fromstate
. Vanilla blocks perform removal cleanups here.- Overrides:
onStateReplaced
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbtv;Lfx;Lcht;Z)V
intermediary method_9536
Lnet/minecraft/class_4970;method_9536(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V
named onStateReplaced
Lnet/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:
getWeakRedstonePower
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lchs;a(Lcht;Lbsz;Lfx;Lgc;)I
intermediary method_9524
Lnet/minecraft/class_4970;method_9524(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)I
named getWeakRedstonePower
Lnet/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:
getStrongRedstonePower
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official b
Lchs;b(Lcht;Lbsz;Lfx;Lgc;)I
intermediary method_9603
Lnet/minecraft/class_4970;method_9603(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)I
named getStrongRedstonePower
Lnet/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:
emitsRedstonePower
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official d_
Lchs;d_(Lcht;)Z
intermediary method_9506
Lnet/minecraft/class_4970;method_9506(Lnet/minecraft/class_2680;)Z
named emitsRedstonePower
Lnet/minecraft/block/AbstractBlock;emitsRedstonePower(Lnet/minecraft/block/BlockState;)Z
-
updateNeighbors
- Mappings:
Namespace Name Mixin selector official e
Lcau;e(Lcht;Lbtv;Lfx;)V
intermediary method_10309
Lnet/minecraft/class_2401;method_10309(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V
named updateNeighbors
Lnet/minecraft/block/LeverBlock;updateNeighbors(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
appendProperties
- Overrides:
appendProperties
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lbwu;a(Lchu$a;)V
intermediary method_9515
Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V
named appendProperties
Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-