Class ButtonBlock
- All Implemented Interfaces:
- ItemConvertible,- ToggleableFeature
- Mappings:
- Namespace - Name - official - cpw- intermediary - net/minecraft/class_2269- named - net/minecraft/block/ButtonBlock
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.block.BlockBlock.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlockAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final BlockSetTypeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprivate static final intprivate static final intprotected static final intprotected static final intprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapestatic final BooleanPropertyprivate final intprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprotected static final VoxelShapeprivate final booleanFields inherited from class net.minecraft.block.WallMountedBlockFACEFields inherited from class net.minecraft.block.HorizontalFacingBlockFACINGFields inherited from class net.minecraft.block.Blockfield_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, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlockcollidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureFEATURE_ENABLED_REGISTRY_KEYS
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedButtonBlock(AbstractBlock.Settings settings, BlockSetType blockSetType, int pressTicks, boolean wooden) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.booleanemitsRedstonePower(BlockState state) Returns whether the block is capable of emitting redstone power.protected SoundEventgetClickSound(boolean powered) getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) intgetStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the strong redstone power emitted from the block.intgetWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the weak redstone power emitted from the block.voidonEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) Called when the entity's collision box intersects the block.voidonStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called server-side on the old block when the block state is changed.onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.protected voidplayClickSound(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, boolean powered) voidpowerOn(BlockState state, World world, BlockPos pos) voidscheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block receives a scheduled tick.protected voidtryPowerWithProjectiles(BlockState state, World world, BlockPos pos) private voidupdateNeighbors(BlockState state, World world, BlockPos pos) Methods inherited from class net.minecraft.block.WallMountedBlockcanPlaceAt, canPlaceAt, getDirection, getPlacementState, getStateForNeighborUpdateMethods inherited from class net.minecraft.block.HorizontalFacingBlockmirror, rotateMethods inherited from class net.minecraft.block.BlockafterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, 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, isTransparent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlockcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSidesShape, getVerticalModelOffsetMultiplier, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, neighborUpdate, onBlockAdded, onBlockBreakStart, onProjectileHit, onStacksDropped, onSyncedBlockEvent, prepare, randomTickMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureisEnabled
- 
Field Details- 
POWERED- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcpw;a:Ldcs;- intermediary - field_10729- Lnet/minecraft/class_2269;field_10729:Lnet/minecraft/class_2746;- named - POWERED- Lnet/minecraft/block/ButtonBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
 
- 
field_31040private static final int field_31040- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - J- Lcpw;J:I- intermediary - field_31040- Lnet/minecraft/class_2269;field_31040:I- named - field_31040- Lnet/minecraft/block/ButtonBlock;field_31040:I
 
- 
field_31041private static final int field_31041- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - K- Lcpw;K:I- intermediary - field_31041- Lnet/minecraft/class_2269;field_31041:I- named - field_31041- Lnet/minecraft/block/ButtonBlock;field_31041:I
 
- 
field_31042protected static final int field_31042- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lcpw;b:I- intermediary - field_31042- Lnet/minecraft/class_2269;field_31042:I- named - field_31042- Lnet/minecraft/block/ButtonBlock;field_31042:I
 
- 
field_31043protected static final int field_31043- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lcpw;c:I- intermediary - field_31043- Lnet/minecraft/class_2269;field_31043:I- named - field_31043- Lnet/minecraft/block/ButtonBlock;field_31043:I
 
- 
CEILING_X_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - d- Lcpw;d:Lefb;- intermediary - field_10721- Lnet/minecraft/class_2269;field_10721:Lnet/minecraft/class_265;- named - CEILING_X_SHAPE- Lnet/minecraft/block/ButtonBlock;CEILING_X_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
CEILING_Z_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - e- Lcpw;e:Lefb;- intermediary - field_10727- Lnet/minecraft/class_2269;field_10727:Lnet/minecraft/class_265;- named - CEILING_Z_SHAPE- Lnet/minecraft/block/ButtonBlock;CEILING_Z_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
FLOOR_X_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - f- Lcpw;f:Lefb;- intermediary - field_10723- Lnet/minecraft/class_2269;field_10723:Lnet/minecraft/class_265;- named - FLOOR_X_SHAPE- Lnet/minecraft/block/ButtonBlock;FLOOR_X_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
FLOOR_Z_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - g- Lcpw;g:Lefb;- intermediary - field_10716- Lnet/minecraft/class_2269;field_10716:Lnet/minecraft/class_265;- named - FLOOR_Z_SHAPE- Lnet/minecraft/block/ButtonBlock;FLOOR_Z_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
NORTH_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - h- Lcpw;h:Lefb;- intermediary - field_10728- Lnet/minecraft/class_2269;field_10728:Lnet/minecraft/class_265;- named - NORTH_SHAPE- Lnet/minecraft/block/ButtonBlock;NORTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
SOUTH_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - i- Lcpw;i:Lefb;- intermediary - field_10715- Lnet/minecraft/class_2269;field_10715:Lnet/minecraft/class_265;- named - SOUTH_SHAPE- Lnet/minecraft/block/ButtonBlock;SOUTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
WEST_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - j- Lcpw;j:Lefb;- intermediary - field_10731- Lnet/minecraft/class_2269;field_10731:Lnet/minecraft/class_265;- named - WEST_SHAPE- Lnet/minecraft/block/ButtonBlock;WEST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
EAST_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - k- Lcpw;k:Lefb;- intermediary - field_10720- Lnet/minecraft/class_2269;field_10720:Lnet/minecraft/class_265;- named - EAST_SHAPE- Lnet/minecraft/block/ButtonBlock;EAST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
CEILING_X_PRESSED_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - l- Lcpw;l:Lefb;- intermediary - field_10717- Lnet/minecraft/class_2269;field_10717:Lnet/minecraft/class_265;- named - CEILING_X_PRESSED_SHAPE- Lnet/minecraft/block/ButtonBlock;CEILING_X_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
CEILING_Z_PRESSED_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - m- Lcpw;m:Lefb;- intermediary - field_10726- Lnet/minecraft/class_2269;field_10726:Lnet/minecraft/class_265;- named - CEILING_Z_PRESSED_SHAPE- Lnet/minecraft/block/ButtonBlock;CEILING_Z_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
FLOOR_X_PRESSED_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - n- Lcpw;n:Lefb;- intermediary - field_10722- Lnet/minecraft/class_2269;field_10722:Lnet/minecraft/class_265;- named - FLOOR_X_PRESSED_SHAPE- Lnet/minecraft/block/ButtonBlock;FLOOR_X_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
FLOOR_Z_PRESSED_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - D- Lcpw;D:Lefb;- intermediary - field_10730- Lnet/minecraft/class_2269;field_10730:Lnet/minecraft/class_265;- named - FLOOR_Z_PRESSED_SHAPE- Lnet/minecraft/block/ButtonBlock;FLOOR_Z_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
NORTH_PRESSED_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - E- Lcpw;E:Lefb;- intermediary - field_10719- Lnet/minecraft/class_2269;field_10719:Lnet/minecraft/class_265;- named - NORTH_PRESSED_SHAPE- Lnet/minecraft/block/ButtonBlock;NORTH_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
SOUTH_PRESSED_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - F- Lcpw;F:Lefb;- intermediary - field_10724- Lnet/minecraft/class_2269;field_10724:Lnet/minecraft/class_265;- named - SOUTH_PRESSED_SHAPE- Lnet/minecraft/block/ButtonBlock;SOUTH_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
WEST_PRESSED_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - G- Lcpw;G:Lefb;- intermediary - field_10732- Lnet/minecraft/class_2269;field_10732:Lnet/minecraft/class_265;- named - WEST_PRESSED_SHAPE- Lnet/minecraft/block/ButtonBlock;WEST_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
EAST_PRESSED_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - H- Lcpw;H:Lefb;- intermediary - field_10718- Lnet/minecraft/class_2269;field_10718:Lnet/minecraft/class_265;- named - EAST_PRESSED_SHAPE- Lnet/minecraft/block/ButtonBlock;EAST_PRESSED_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
blockSetType- Mappings:
- Namespace - Name - Mixin selector - official - L- Lcpw;L:Ldcq;- intermediary - field_42753- Lnet/minecraft/class_2269;field_42753:Lnet/minecraft/class_8177;- named - blockSetType- Lnet/minecraft/block/ButtonBlock;blockSetType:Lnet/minecraft/block/BlockSetType;
 
- 
pressTicksprivate final int pressTicks- Mappings:
- Namespace - Name - Mixin selector - official - M- Lcpw;M:I- intermediary - field_40298- Lnet/minecraft/class_2269;field_40298:I- named - pressTicks- Lnet/minecraft/block/ButtonBlock;pressTicks:I
 
- 
woodenprivate final boolean wooden- Mappings:
- Namespace - Name - Mixin selector - official - N- Lcpw;N:Z- intermediary - field_40299- Lnet/minecraft/class_2269;field_40299:Z- named - wooden- Lnet/minecraft/block/ButtonBlock;wooden:Z
 
 
- 
- 
Constructor Details- 
ButtonBlockprotected ButtonBlock(AbstractBlock.Settings settings, BlockSetType blockSetType, int pressTicks, boolean wooden) - Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lcpw;<init>(Ldca$d;Ldcq;IZ)V- intermediary - <init>- Lnet/minecraft/class_2269;<init>(Lnet/minecraft/class_4970$class_2251;Lnet/minecraft/class_8177;IZ)V- named - <init>- Lnet/minecraft/block/ButtonBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;Lnet/minecraft/block/BlockSetType;IZ)V
 
 
- 
- 
Method Details- 
getOutlineShapepublic VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
- getOutlineShapein class- AbstractBlock
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcls;Lgu;Leen;)Lefb;- 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;
 
- 
onUsepublic 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 class- AbstractBlock
- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcmm;Lgu;Lbyo;Lbdw;Leee;)Lbdx;- 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;
 
- 
powerOn- Mappings:
- Namespace - Name - Mixin selector - official - d- Lcpw;d(Ldcb;Lcmm;Lgu;)V- intermediary - method_21845- Lnet/minecraft/class_2269;method_21845(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V- named - powerOn- Lnet/minecraft/block/ButtonBlock;powerOn(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
 
- 
playClickSoundprotected void playClickSound(@Nullable @Nullable PlayerEntity player, WorldAccess world, BlockPos pos, boolean powered) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lcpw;a(Lbyo;Lcmn;Lgu;Z)V- intermediary - method_9714- Lnet/minecraft/class_2269;method_9714(Lnet/minecraft/class_1657;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Z)V- named - playClickSound- Lnet/minecraft/block/ButtonBlock;playClickSound(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Z)V
 
- 
getClickSound- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcpw;a(Z)Lamg;- intermediary - method_9712- Lnet/minecraft/class_2269;method_9712(Z)Lnet/minecraft/class_3414;- named - getClickSound- Lnet/minecraft/block/ButtonBlock;getClickSound(Z)Lnet/minecraft/sound/SoundEvent;
 
- 
onStateReplacedpublic void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called server-side on the old block when the block state is changed. This includes block removal. This is used to update neighboring blocks when an active redstone power source is removed, or to drop the contents of an inventory. The checkstate.isOf(newState.getBlock())can be used to see if the block was removed or not.- Overrides:
- onStateReplacedin class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcmm;Lgu;Ldcb;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
 
- 
getWeakRedstonePowerpublic int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the weak redstone power emitted from the block.When overriding this, make sure to also override AbstractBlock.emitsRedstonePower(net.minecraft.block.BlockState)to returntrue.Weak redstone power is a power that cannot power a redstone wire when a solid block is in between. For example, RedstoneBlockandTargetBlockemits weak redstone power only.LeverBlockandButtonBlockemits both weak and strong redstone power depending on the direction.- Overrides:
- getWeakRedstonePowerin class- AbstractBlock
- Returns:
- the weak redstone power emitted from the block
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcls;Lgu;Lha;)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
 
- 
getStrongRedstonePowerpublic int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the strong redstone power emitted from the block.When overriding this, make sure to also override AbstractBlock.emitsRedstonePower(net.minecraft.block.BlockState)to returntrue.AbstractBlock.getWeakRedstonePower(net.minecraft.block.BlockState, net.minecraft.world.BlockView, net.minecraft.util.math.BlockPos, net.minecraft.util.math.Direction)might also need to be overridden.Strong redstone power is a power that can power a redstone wire when a solid block is in between. For example, RedstoneBlockandTargetBlockemits weak redstone power only.LeverBlockandButtonBlockemits both weak and strong redstone power.- Overrides:
- getStrongRedstonePowerin class- AbstractBlock
- Returns:
- the strong redstone power emitted from the block
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Ldca;b(Ldcb;Lcls;Lgu;Lha;)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
 
- 
emitsRedstonePowerReturns whether the block is capable of emitting redstone power.This does not return whether the block is currently emitting redstone power. Use RedstoneView.isEmittingRedstonePower(net.minecraft.util.math.BlockPos, net.minecraft.util.math.Direction)in that case.- Overrides:
- emitsRedstonePowerin class- AbstractBlock
- Returns:
- whether the block is capable of emitting redstone power
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - f_- Ldca;f_(Ldcb;)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
 
- 
scheduledTickCalled server-side when a block receives a scheduled tick. This can be used like a timer. Scheduled ticks are added usingWorldAccess.scheduleBlockTick(BlockPos, Block, int). Additionally,AbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)by default calls this method; overrideAbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)to disable this behavior.Scheduled ticks are often used inside AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.util.math.BlockPos).Here are some examples: - SugarCaneBlockchecks the placement requirement.
- DispenserBlockdispenses its content.
- CommandBlockexecutes its command.
- FrogspawnBlockspawns a tadpole.
- SoulSandBlockupdates a bubble column.
- FallingBlocktries to fall.
 - Overrides:
- scheduledTickin class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Laif;Lgu;Lapf;)V- intermediary - method_9588- Lnet/minecraft/class_4970;method_9588(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V- named - scheduledTick- Lnet/minecraft/block/AbstractBlock;scheduledTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V
 
- 
onEntityCollisionCalled when the entity's collision box intersects the block. Therefore, this method is not called for blocks with a collision; useBlock.onSteppedOn(net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, net.minecraft.entity.Entity)for those blocks.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.Here are some examples: - CactusBlockdamages the entity.
- AbstractPressurePlateBlocktriggers.
- CobwebBlockslows the entity.
- EndPortalBlockteleports the entity.
- HopperBlockcollects the item entity.
 - Overrides:
- onEntityCollisionin class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcmm;Lgu;Lbfj;)V- intermediary - method_9548- Lnet/minecraft/class_4970;method_9548(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1297;)V- named - onEntityCollision- Lnet/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 - e- Lcpw;e(Ldcb;Lcmm;Lgu;)V- intermediary - method_9715- Lnet/minecraft/class_2269;method_9715(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V- named - tryPowerWithProjectiles- Lnet/minecraft/block/ButtonBlock;tryPowerWithProjectiles(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
 
- 
updateNeighbors- Mappings:
- Namespace - Name - Mixin selector - official - f- Lcpw;f(Ldcb;Lcmm;Lgu;)V- intermediary - method_9713- Lnet/minecraft/class_2269;method_9713(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V- named - updateNeighbors- Lnet/minecraft/block/ButtonBlock;updateNeighbors(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
 
- 
appendPropertiesAppends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])inside the method. SeePropertiesfor the list of pre-defined properties.- Overrides:
- appendPropertiesin class- Block
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcpn;a(Ldcc$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
 
 
-