Package net.minecraft.block
Class AbstractButtonBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.HorizontalFacingBlock
net.minecraft.block.WallMountedBlock
net.minecraft.block.AbstractButtonBlock
- All Implemented Interfaces:
ItemConvertible
- Direct Known Subclasses:
StoneButtonBlock,WoodenButtonBlock
public abstract class AbstractButtonBlock extends WallMountedBlock
- Mappings:
Namespace Name official bxcintermediary net/minecraft/class_2269named net/minecraft/block/AbstractButtonBlock
-
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
Fields Modifier and Type Field Description protected static VoxelShapeCEILING_X_PRESSED_SHAPEprotected static VoxelShapeCEILING_X_SHAPEprotected static VoxelShapeCEILING_Z_PRESSED_SHAPEprotected static VoxelShapeCEILING_Z_SHAPEprotected static VoxelShapeEAST_PRESSED_SHAPEprotected static VoxelShapeEAST_SHAPEprotected static VoxelShapeFLOOR_X_PRESSED_SHAPEprotected static VoxelShapeFLOOR_X_SHAPEprotected static VoxelShapeFLOOR_Z_PRESSED_SHAPEprotected static VoxelShapeFLOOR_Z_SHAPEprotected static VoxelShapeNORTH_PRESSED_SHAPEprotected static VoxelShapeNORTH_SHAPEstatic BooleanPropertyPOWEREDprotected static VoxelShapeSOUTH_PRESSED_SHAPEprotected static VoxelShapeSOUTH_SHAPEprotected static VoxelShapeWEST_PRESSED_SHAPEprotected static VoxelShapeWEST_SHAPEprivate booleanwoodenFields inherited from class net.minecraft.block.WallMountedBlock
FACEFields inherited from class net.minecraft.block.HorizontalFacingBlock
FACINGFields inherited from class net.minecraft.block.Block
LOGGER, 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 Modifier Constructor Description protectedAbstractButtonBlock(boolean wooden, AbstractBlock.Settings settings) -
Method Summary
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
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, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods 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, onProjectileHit, onStacksDropped, onSyncedBlockEvent, prepare, randomTick
-
Field Details
-
POWERED
- Mappings:
Namespace Name Mixin selector official aLbxc;a:Lcik;intermediary field_10729Lnet/minecraft/class_2269;field_10729:Lnet/minecraft/class_2746;named POWEREDLnet/minecraft/block/AbstractButtonBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
-
CEILING_X_SHAPE
- Mappings:
Namespace Name Mixin selector official bLbxc;b:Ldjn;intermediary field_10721Lnet/minecraft/class_2269;field_10721:Lnet/minecraft/class_265;named CEILING_X_SHAPELnet/minecraft/block/AbstractButtonBlock;CEILING_X_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
CEILING_Z_SHAPE
- Mappings:
Namespace Name Mixin selector official cLbxc;c:Ldjn;intermediary field_10727Lnet/minecraft/class_2269;field_10727:Lnet/minecraft/class_265;named CEILING_Z_SHAPELnet/minecraft/block/AbstractButtonBlock;CEILING_Z_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
FLOOR_X_SHAPE
- Mappings:
Namespace Name Mixin selector official dLbxc;d:Ldjn;intermediary field_10723Lnet/minecraft/class_2269;field_10723:Lnet/minecraft/class_265;named FLOOR_X_SHAPELnet/minecraft/block/AbstractButtonBlock;FLOOR_X_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
FLOOR_Z_SHAPE
- Mappings:
Namespace Name Mixin selector official eLbxc;e:Ldjn;intermediary field_10716Lnet/minecraft/class_2269;field_10716:Lnet/minecraft/class_265;named FLOOR_Z_SHAPELnet/minecraft/block/AbstractButtonBlock;FLOOR_Z_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
NORTH_SHAPE
- Mappings:
Namespace Name Mixin selector official fLbxc;f:Ldjn;intermediary field_10728Lnet/minecraft/class_2269;field_10728:Lnet/minecraft/class_265;named NORTH_SHAPELnet/minecraft/block/AbstractButtonBlock;NORTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
SOUTH_SHAPE
- Mappings:
Namespace Name Mixin selector official gLbxc;g:Ldjn;intermediary field_10715Lnet/minecraft/class_2269;field_10715:Lnet/minecraft/class_265;named SOUTH_SHAPELnet/minecraft/block/AbstractButtonBlock;SOUTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
WEST_SHAPE
- Mappings:
Namespace Name Mixin selector official hLbxc;h:Ldjn;intermediary field_10731Lnet/minecraft/class_2269;field_10731:Lnet/minecraft/class_265;named WEST_SHAPELnet/minecraft/block/AbstractButtonBlock;WEST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EAST_SHAPE
- Mappings:
Namespace Name Mixin selector official iLbxc;i:Ldjn;intermediary field_10720Lnet/minecraft/class_2269;field_10720:Lnet/minecraft/class_265;named EAST_SHAPELnet/minecraft/block/AbstractButtonBlock;EAST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
CEILING_X_PRESSED_SHAPE
- Mappings:
Namespace Name Mixin selector official jLbxc;j:Ldjn;intermediary field_10717Lnet/minecraft/class_2269;field_10717:Lnet/minecraft/class_265;named CEILING_X_PRESSED_SHAPELnet/minecraft/block/AbstractButtonBlock;CEILING_X_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
CEILING_Z_PRESSED_SHAPE
- Mappings:
Namespace Name Mixin selector official kLbxc;k:Ldjn;intermediary field_10726Lnet/minecraft/class_2269;field_10726:Lnet/minecraft/class_265;named CEILING_Z_PRESSED_SHAPELnet/minecraft/block/AbstractButtonBlock;CEILING_Z_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
FLOOR_X_PRESSED_SHAPE
- Mappings:
Namespace Name Mixin selector official oLbxc;o:Ldjn;intermediary field_10722Lnet/minecraft/class_2269;field_10722:Lnet/minecraft/class_265;named FLOOR_X_PRESSED_SHAPELnet/minecraft/block/AbstractButtonBlock;FLOOR_X_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
FLOOR_Z_PRESSED_SHAPE
- Mappings:
Namespace Name Mixin selector official pLbxc;p:Ldjn;intermediary field_10730Lnet/minecraft/class_2269;field_10730:Lnet/minecraft/class_265;named FLOOR_Z_PRESSED_SHAPELnet/minecraft/block/AbstractButtonBlock;FLOOR_Z_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
NORTH_PRESSED_SHAPE
- Mappings:
Namespace Name Mixin selector official qLbxc;q:Ldjn;intermediary field_10719Lnet/minecraft/class_2269;field_10719:Lnet/minecraft/class_265;named NORTH_PRESSED_SHAPELnet/minecraft/block/AbstractButtonBlock;NORTH_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
SOUTH_PRESSED_SHAPE
- Mappings:
Namespace Name Mixin selector official rLbxc;r:Ldjn;intermediary field_10724Lnet/minecraft/class_2269;field_10724:Lnet/minecraft/class_265;named SOUTH_PRESSED_SHAPELnet/minecraft/block/AbstractButtonBlock;SOUTH_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
WEST_PRESSED_SHAPE
- Mappings:
Namespace Name Mixin selector official sLbxc;s:Ldjn;intermediary field_10732Lnet/minecraft/class_2269;field_10732:Lnet/minecraft/class_265;named WEST_PRESSED_SHAPELnet/minecraft/block/AbstractButtonBlock;WEST_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
EAST_PRESSED_SHAPE
- Mappings:
Namespace Name Mixin selector official tLbxc;t:Ldjn;intermediary field_10718Lnet/minecraft/class_2269;field_10718:Lnet/minecraft/class_265;named EAST_PRESSED_SHAPELnet/minecraft/block/AbstractButtonBlock;EAST_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
-
wooden
private final boolean wooden- Mappings:
Namespace Name Mixin selector official vLbxc;v:Zintermediary field_10725Lnet/minecraft/class_2269;field_10725:Znamed woodenLnet/minecraft/block/AbstractButtonBlock;wooden:Z
-
-
Constructor Details
-
AbstractButtonBlock
- Mappings:
Namespace Name Mixin selector official <init>Lbxc;<init>(ZLchs$c;)Vintermediary <init>Lnet/minecraft/class_2269;<init>(ZLnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/AbstractButtonBlock;<init>(ZLnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getPressTicks
private int getPressTicks()- Mappings:
Namespace Name Mixin selector official cLbxc;c()Iintermediary method_26153Lnet/minecraft/class_2269;method_26153()Inamed getPressTicksLnet/minecraft/block/AbstractButtonBlock;getPressTicks()I
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShapein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLchs;a(Lcht;Lbsz;Lfx;Ldiz;)Ldjn;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 aLchs;a(Lcht;Lbtv;Lfx;Lbhl;Lapp;Ldiq;)Lapq;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;
-
powerOn
- Mappings:
Namespace Name Mixin selector official dLbxc;d(Lcht;Lbtv;Lfx;)Vintermediary method_21845Lnet/minecraft/class_2269;method_21845(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Vnamed powerOnLnet/minecraft/block/AbstractButtonBlock;powerOn(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
playClickSound
protected void playClickSound(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, boolean powered)- Mappings:
Namespace Name Mixin selector official aLbxc;a(Lbhl;Lbtw;Lfx;Z)Vintermediary method_9714Lnet/minecraft/class_2269;method_9714(Lnet/minecraft/class_1657;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Z)Vnamed playClickSoundLnet/minecraft/block/AbstractButtonBlock;playClickSound(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Z)V
-
getClickSound
- Mappings:
Namespace Name Mixin selector official aLbxc;a(Z)Laef;intermediary method_9712Lnet/minecraft/class_2269;method_9712(Z)Lnet/minecraft/class_3414;named getClickSoundLnet/minecraft/block/AbstractButtonBlock;getClickSound(Z)Lnet/minecraft/sound/SoundEvent;
-
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 aLchs;a(Lcht;Lbtv;Lfx;Lcht;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 aLchs;a(Lcht;Lbsz;Lfx;Lgc;)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 bLchs;b(Lcht;Lbsz;Lfx;Lgc;)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 d_Lchs;d_(Lcht;)Zintermediary method_9506Lnet/minecraft/class_4970;method_9506(Lnet/minecraft/class_2680;)Znamed emitsRedstonePowerLnet/minecraft/block/AbstractBlock;emitsRedstonePower(Lnet/minecraft/block/BlockState;)Z
-
scheduledTick
- Overrides:
scheduledTickin classAbstractBlock- Mappings:
Namespace Name Mixin selector official a_Lchs;a_(Lcht;Laav;Lfx;Ljava/util/Random;)Vintermediary method_9588Lnet/minecraft/class_4970;method_9588(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Ljava/util/Random;)Vnamed scheduledTickLnet/minecraft/block/AbstractBlock;scheduledTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Ljava/util/Random;)V
-
onEntityCollision
- Overrides:
onEntityCollisionin classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLchs;a(Lcht;Lbtv;Lfx;Laqv;)Vintermediary method_9548Lnet/minecraft/class_4970;method_9548(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1297;)Vnamed onEntityCollisionLnet/minecraft/block/AbstractBlock;onEntityCollision(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;)V
-
tryPowerWithProjectiles
- Mappings:
Namespace Name Mixin selector official eLbxc;e(Lcht;Lbtv;Lfx;)Vintermediary method_9715Lnet/minecraft/class_2269;method_9715(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Vnamed tryPowerWithProjectilesLnet/minecraft/block/AbstractButtonBlock;tryPowerWithProjectiles(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
updateNeighbors
- Mappings:
Namespace Name Mixin selector official fLbxc;f(Lcht;Lbtv;Lfx;)Vintermediary method_9713Lnet/minecraft/class_2269;method_9713(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Vnamed updateNeighborsLnet/minecraft/block/AbstractButtonBlock;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 aLbwu;a(Lchu$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
-