Class AbstractBlock
- All Implemented Interfaces:
- ToggleableFeature
- Direct Known Subclasses:
- Block
blocks.
 This class should not be extended directly. Extend Block instead.
 Custom block behaviors are specified either through block settings or by overriding methods in this class.
 Methods in this class may be executed during world generation if they take
 WorldAccess as a parameter. In this case, a ChunkRegion
 is passed to the parameter, which is not a subclass of World.
- API Note:
- In vanilla subclasses, these methods are called either to do the
 default behavior (e.g. super.onUse(...)). Because the methods areprotected, you must use these methods via the corresponding method inAbstractBlock.AbstractBlockState.Many methods of this class are called on both the logical client and logical server, so take caution when using those methods. The logical side can be checked using World.isClient.Quick viewNotes: "Tall or wide block" refers to a block that has multiple parts, such as doors, sunflowers, or beds. "Neighboring block" refers to blocks adjacent to a block on all 6 sides (but not diagonally.) Placement related methodsBlock placement related methods (sorted by execution order) Method Purpose Player/dispenser Falling block setBlockStatecalloldState. canReplaceChecking if the current block can be replaced Yes Yes No newBlock. getPlacementStateGetting the placed state Yes Yes No newState. canPlaceAtChecking the block's placement restriction Yes Yes No oldState. onStateReplacedDropping inventory, updating redstone circuit, etc Yes Yes Yes newState. onBlockAddedActivating redstone component, etc Yes Yes Yes neighborState. neighborUpdateActivating neighboring redstone component, etc Yes Yes Yes oldState. prepareUpdating redstone wire connection Yes Yes Yes neighborState. getStateForNeighborUpdateChecking the neighboring block's placement restriction, updating connection, etc Yes Yes Yes newState. prepareUpdating redstone wire connection Yes Yes Yes newBlock. onPlacedPlacing the other half of tall or wide block, setting block entity's custom name, etc Yes No No Breaking related methodsBlock breaking related methods (sorted by execution order) Method Purpose Player mining Explosion setBlockState/removeBlockcallbreakBlockcallstate. onBlockBreakStartDoing something when player starts breaking a block Yes No No No state. calcBlockBreakingDeltaCalculating the player's mining speed Yes No No No block. onBreakSpawning particles, breaking the other half of tall or wide block, etc Yes No No No state. onStateReplacedDropping inventory, updating redstone circuit, etc Yes Yes Yes Yes neighborState. neighborUpdateActivating neighboring redstone component, etc Yes Yes Yes Yes state. prepareUpdating redstone wire connection Yes Yes Yes Yes neighborState. getStateForNeighborUpdateChecking the neighboring block's placement restriction, updating connection, etc Yes Yes Yes Yes block. onBrokenUnused in most cases Yes No No No block. afterBreakDropping stacks, replacing the broken block with another block, etc Yes No No No state. getDroppedStacksSupplying information to loot context builder Yes Yes Yes Yes1 state. onStacksDroppedDropping experience orbs Yes Yes2 Yes Yes1 Notes: - Called before onStateReplacedin this case.
- Called before getDroppedStacksin this case.
 
- Called before 
- Mappings:
- Namespace - Name - named - net/minecraft/block/AbstractBlock- intermediary - net/minecraft/class_4970- official - dsd
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic interfacestatic enumstatic classstatic interface
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final booleanWhether this block can be walked on or through.protected static final Direction[]protected final booleanWhether this block's collision shape can change.protected final floatThe multiplier applied to the velocity of aLivingEntitywhen it jumps off this block.protected @Nullable RegistryKey<LootTable> TheRegistryKeyof the loot table that determines what this block drops.protected final booleanWhether this block should tick when randomly selected when ticking the world.protected final FeatureSetThe set ofFeatureFlagsthat are required for this block to work correctly.protected final floatThe blast resistance of the block.protected final AbstractBlock.SettingsTheAbstractBlock.Settingsto apply to this block.protected final floatA speed reduction applied to aLivingEntitythat tries to move across this block.protected final BlockSoundGroupThe collection of sounds played when breaking, stepping on, placing, hitting (with a projectile), or falling on this block.protected final floatThe multiplier applied to the velocity of anEntitywhen it walks on this block.Fields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureFEATURE_ENABLED_REGISTRY_KEYS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract BlockasBlock()Returns the block asBlock.abstract ItemasItem()Returns the block's corresponding item.protected floatcalcBlockBreakingDelta(BlockState state, PlayerEntity player, BlockView world, BlockPos pos) protected booleancanBucketPlace(BlockState state, Fluid fluid) Returns whether a bucket can replace the block with the fluid.protected booleancanPathfindThrough(BlockState state, NavigationType type) Returns if an entity using navigation typetypecan navigate through this block.protected booleancanPlaceAt(BlockState state, WorldView world, BlockPos pos) Returns whether the block can be placed atpos.protected booleancanReplace(BlockState state, ItemPlacementContext context) Returns whether the item can replace the block.static <B extends Block>
 com.mojang.serialization.MapCodec<B> createCodec(Function<AbstractBlock.Settings, B> blockFromSettings) protected @Nullable NamedScreenHandlerFactorycreateScreenHandlerFactory(BlockState state, World world, BlockPos pos) Returns the screen handler factory ornullif screen handler cannot be created.protected static <B extends Block>
 com.mojang.serialization.codecs.RecordCodecBuilder<B, AbstractBlock.Settings> protected booleanemitsRedstonePower(BlockState state) Returns whether the block is capable of emitting redstone power.protected floatgetAmbientOcclusionLightLevel(BlockState state, BlockView world, BlockPos pos) protected VoxelShapegetCameraCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) protected abstract com.mojang.serialization.MapCodec<? extends Block> getCodec()protected VoxelShapegetCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) protected intgetComparatorOutput(BlockState state, World world, BlockPos pos) Returns the comparator output of the block, from0to15.protected VoxelShapegetCullingShape(BlockState state, BlockView world, BlockPos pos) getDroppedStacks(BlockState state, LootContextParameterSet.Builder builder) Returns the block's dropped item stacks.protected FluidStategetFluidState(BlockState state) Returns the state's associated fluid state.floatfinal RegistryKey<LootTable> protected floatprotected intgetOpacity(BlockState state, BlockView world, BlockPos pos) protected VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) protected VoxelShapegetRaycastShape(BlockState state, BlockView world, BlockPos pos) protected longgetRenderingSeed(BlockState state, BlockPos pos) Returns the seed value for rendering.protected BlockRenderTypegetRenderType(BlockState state) Returns the block's render type (invisible, animated, model).protected VoxelShapegetSidesShape(BlockState state, BlockView world, BlockPos pos) protected BlockSoundGroupgetSoundGroup(BlockState state) protected BlockStategetStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Returns the state of the block after a neighboring block's state change.protected intgetStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the strong redstone power emitted from the block.protected floatprotected intgetWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the weak redstone power emitted from the block.protected booleanhasComparatorOutput(BlockState state) Returns whether the block can have a comparator output.protected booleanhasRandomTicks(BlockState state) protected booleanhasSidedTransparency(BlockState state) Returns whether the block's transparency depends on the side of the block, like slabs.protected booleanisCullingShapeFullCube(BlockState state, BlockView world, BlockPos pos) protected booleanisShapeFullCube(BlockState state, BlockView world, BlockPos pos) protected booleanisSideInvisible(BlockState state, BlockState stateFrom, Direction direction) protected booleanisTransparent(BlockState state, BlockView world, BlockPos pos) protected BlockStatemirror(BlockState state, BlockMirror mirror) Returnsstatemirrored bymirror.protected voidneighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) Called when a neighboring block is updated.protected voidonBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) Called server-side on the new block when the block state is changed.protected voidonBlockBreakStart(BlockState state, World world, BlockPos pos, PlayerEntity player) Called when a player starts breaking the block (including when instant-mining).protected voidonEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) Called when the entity's collision box intersects the block.protected voidonExploded(BlockState state, World world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected voidonProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile) Called when aProjectileEntityhits a block.protected voidonStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.protected voidonStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called server-side on the old block when the block state is changed.protected booleanonSyncedBlockEvent(BlockState state, World world, BlockPos pos, int type, int data) Handles the block event, which is an event specific to a block with an integer ID and data.protected ActionResultonUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) protected ItemActionResultonUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected voidprepare(BlockState state, WorldAccess world, BlockPos pos, int flags, int maxUpdateDepth) Called when the block state changes, before the neighbor-triggered state update on the original block, and after the neighbor-triggered state update on the replaced block.protected voidrandomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block gets ticked randomly.protected BlockStaterotate(BlockState state, BlockRotation rotation) Returnsstaterotated byrotation.protected voidscheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block receives a scheduled tick.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureisEnabled
- 
Field Details- 
DIRECTIONS- Mappings:
- Namespace - Name - Mixin selector - named - DIRECTIONS- Lnet/minecraft/block/AbstractBlock;DIRECTIONS:[Lnet/minecraft/util/math/Direction;- intermediary - field_23157- Lnet/minecraft/class_4970;field_23157:[Lnet/minecraft/class_2350;- official - aF- Ldsd;aF:[Lje;
 
- 
collidableprotected final boolean collidableWhether this block can be walked on or through.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - collidable- Lnet/minecraft/block/AbstractBlock;collidable:Z- intermediary - field_23159- Lnet/minecraft/class_4970;field_23159:Z- official - aG- Ldsd;aG:Z
 
- 
resistanceprotected final float resistanceThe blast resistance of the block.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - resistance- Lnet/minecraft/block/AbstractBlock;resistance:F- intermediary - field_23160- Lnet/minecraft/class_4970;field_23160:F- official - aH- Ldsd;aH:F
 
- 
randomTicksprotected final boolean randomTicksWhether this block should tick when randomly selected when ticking the world. An example of this ticking is crop growth.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - randomTicks- Lnet/minecraft/block/AbstractBlock;randomTicks:Z- intermediary - field_23161- Lnet/minecraft/class_4970;field_23161:Z- official - aI- Ldsd;aI:Z
 
- 
soundGroupThe collection of sounds played when breaking, stepping on, placing, hitting (with a projectile), or falling on this block.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - soundGroup- Lnet/minecraft/block/AbstractBlock;soundGroup:Lnet/minecraft/sound/BlockSoundGroup;- intermediary - field_23162- Lnet/minecraft/class_4970;field_23162:Lnet/minecraft/class_2498;- official - aJ- Ldsd;aJ:Ldmo;
 
- 
slipperinessprotected final float slipperinessA speed reduction applied to aLivingEntitythat tries to move across this block.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - slipperiness- Lnet/minecraft/block/AbstractBlock;slipperiness:F- intermediary - field_23163- Lnet/minecraft/class_4970;field_23163:F- official - aK- Ldsd;aK:F
 
- 
velocityMultiplierprotected final float velocityMultiplierThe multiplier applied to the velocity of anEntitywhen it walks on this block.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - velocityMultiplier- Lnet/minecraft/block/AbstractBlock;velocityMultiplier:F- intermediary - field_23164- Lnet/minecraft/class_4970;field_23164:F- official - aL- Ldsd;aL:F
 
- 
jumpVelocityMultiplierprotected final float jumpVelocityMultiplierThe multiplier applied to the velocity of aLivingEntitywhen it jumps off this block.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - jumpVelocityMultiplier- Lnet/minecraft/block/AbstractBlock;jumpVelocityMultiplier:F- intermediary - field_23165- Lnet/minecraft/class_4970;field_23165:F- official - aM- Ldsd;aM:F
 
- 
dynamicBoundsprotected final boolean dynamicBoundsWhether this block's collision shape can change.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - dynamicBounds- Lnet/minecraft/block/AbstractBlock;dynamicBounds:Z- intermediary - field_23154- Lnet/minecraft/class_4970;field_23154:Z- official - aN- Ldsd;aN:Z
 
- 
requiredFeaturesThe set ofFeatureFlagsthat are required for this block to work correctly.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - requiredFeatures- Lnet/minecraft/block/AbstractBlock;requiredFeatures:Lnet/minecraft/resource/featuretoggle/FeatureSet;- intermediary - field_40337- Lnet/minecraft/class_4970;field_40337:Lnet/minecraft/class_7699;- official - aO- Ldsd;aO:Lcpn;
 
- 
settingsTheAbstractBlock.Settingsto apply to this block.- Mappings:
- Namespace - Name - Mixin selector - named - settings- Lnet/minecraft/block/AbstractBlock;settings:Lnet/minecraft/block/AbstractBlock$Settings;- intermediary - field_23155- Lnet/minecraft/class_4970;field_23155:Lnet/minecraft/class_4970$class_2251;- official - aP- Ldsd;aP:Ldsd$d;
 
- 
lootTableKeyTheRegistryKeyof the loot table that determines what this block drops.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - lootTableKey- Lnet/minecraft/block/AbstractBlock;lootTableKey:Lnet/minecraft/registry/RegistryKey;- intermediary - field_23156- Lnet/minecraft/class_4970;field_23156:Lnet/minecraft/class_5321;- official - aQ- Ldsd;aQ:Lale;
 
 
- 
- 
Constructor Details- 
AbstractBlock- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V- intermediary - <init>- Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V- official - <init>- Ldsd;<init>(Ldsd$d;)V
 
 
- 
- 
Method Details- 
getSettings- Mappings:
- Namespace - Name - Mixin selector - named - getSettings- Lnet/minecraft/block/AbstractBlock;getSettings()Lnet/minecraft/block/AbstractBlock$Settings;- intermediary - method_54095- Lnet/minecraft/class_4970;method_54095()Lnet/minecraft/class_4970$class_2251;- official - t- Ldsd;t()Ldsd$d;
 
- 
getCodec- Mappings:
- Namespace - Name - Mixin selector - named - getCodec- Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;- intermediary - method_53969- Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;- official - a- Ldsd;a()Lcom/mojang/serialization/MapCodec;
 
- 
createSettingsCodecprotected static <B extends Block> com.mojang.serialization.codecs.RecordCodecBuilder<B,AbstractBlock.Settings> createSettingsCodec()- Mappings:
- Namespace - Name - Mixin selector - named - createSettingsCodec- Lnet/minecraft/block/AbstractBlock;createSettingsCodec()Lcom/mojang/serialization/codecs/RecordCodecBuilder;- intermediary - method_54096- Lnet/minecraft/class_4970;method_54096()Lcom/mojang/serialization/codecs/RecordCodecBuilder;- official - u- Ldsd;u()Lcom/mojang/serialization/codecs/RecordCodecBuilder;
 
- 
createCodecpublic static <B extends Block> com.mojang.serialization.MapCodec<B> createCodec(Function<AbstractBlock.Settings, B> blockFromSettings) - Mappings:
- Namespace - Name - Mixin selector - named - createCodec- Lnet/minecraft/block/AbstractBlock;createCodec(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;- intermediary - method_54094- Lnet/minecraft/class_4970;method_54094(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;- official - b- Ldsd;b(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;
 
- 
prepareprotected void prepare(BlockState state, WorldAccess world, BlockPos pos, int flags, int maxUpdateDepth) Called when the block state changes, before the neighbor-triggered state update on the original block, and after the neighbor-triggered state update on the replaced block.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.- See Also:
- API Note:
- This is used by RedstoneWireBlockto update connected redstone wire.
- Mappings:
- Namespace - Name - Mixin selector - named - prepare- Lnet/minecraft/block/AbstractBlock;prepare(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;II)V- intermediary - method_9517- Lnet/minecraft/class_4970;method_9517(Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;II)V- official - a- Ldsd;a(Ldse;Ldcb;Liz;II)V
 
- 
getStateForNeighborUpdateprotected BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Returns the state of the block after a neighboring block's state change.Returning Blocks.AIRbreaks the block. This is useful to implement supporting block requirement for blocks (if used along withcanPlaceAt(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.util.math.BlockPos)).Side effects like activating a redstone component (but not scheduling a tick) should be performed in neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.util.math.BlockPos, boolean)instead. If the block supports waterlogging and currently has water, this method should be overridden to tick the fluid at the block's position.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. This is not called ifBlock.FORCE_STATEflag is set in thesetBlockStatecall.This method can be used for multiple purposes. Here are some examples: - FenceBlockuses it to update the fence's connection when a horizontally neighboring block's state is changed.
- PlantBlockuses it to break the plant if the state change causes it to lose its supporting block.
- DoorBlockuses it to copy the state of the other half of the door.
- SlabBlockuses it to schedule the fluid to tick if waterlogged.
- SoulSandBlockuses it to schedule the water block above to tick so that it becomes a bubble column.
- FallingBlockuses it to schedule the block to tick so that it can fall if needed.
 - Parameters:
- state- the state of this block
- direction- the direction from this block to the neighbor
- neighborState- the state of the updated neighbor block
- world- the world
- pos- the position of this block
- neighborPos- the position of the neighbor block
- Returns:
- the state of the block after a neighboring block's state change
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getStateForNeighborUpdate- Lnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;- intermediary - method_9559- Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;- official - a- Ldsd;a(Ldse;Lje;Ldse;Ldcb;Liz;Liz;)Ldse;
 
- 
isSideInvisible- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - isSideInvisible- Lnet/minecraft/block/AbstractBlock;isSideInvisible(Lnet/minecraft/block/BlockState;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)Z- intermediary - method_9522- Lnet/minecraft/class_4970;method_9522(Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;)Z- official - a- Ldsd;a(Ldse;Ldse;Lje;)Z
 
- 
neighborUpdateprotected void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) Called when a neighboring block is updated. This method should be overridden to perform an action with a side effect, most notably an activation of a redstone component. This can also be used to perform an action changing block states of other blocks, such asSpongeBlockwhich absorbs water.To replace the state of the block itself, override 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)instead.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.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - neighborUpdate- Lnet/minecraft/block/AbstractBlock;neighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;Lnet/minecraft/util/math/BlockPos;Z)V- intermediary - method_9612- Lnet/minecraft/class_4970;method_9612(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;Z)V- official - a- Ldsd;a(Ldse;Ldca;Liz;Ldfb;Liz;Z)V
 
- 
onBlockAddedprotected void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) Called server-side on the new block when the block state is changed. This includes block placement. When overriding this method,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)orneighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.util.math.BlockPos, boolean)should also be overridden. The method is used in the following cases:- When activating a redstone component on placement (used along with neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.util.math.BlockPos, boolean)
- When resetting a position-dependent state (see TargetBlock)
- When converting a block on placement (see WetSpongeBlock)
- When fire lights a portal
 - See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - onBlockAdded- Lnet/minecraft/block/AbstractBlock;onBlockAdded(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V- intermediary - method_9615- Lnet/minecraft/class_4970;method_9615(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V- official - b- Ldsd;b(Ldse;Ldca;Liz;Ldse;Z)V
 
- When activating a redstone component on placement (used along with 
- 
onStateReplacedprotected 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.For most block entities, ItemScatterer.onStateReplaced(net.minecraft.block.BlockState, net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)provides a good implementation of this method. Make sure to callsuper.onStateReplaced(state, world, pos, newState, moved);after invokingItemScatterermethods.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - 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- 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- official - a- Ldsd;a(Ldse;Ldca;Liz;Ldse;Z)V
 
- 
onExplodedprotected void onExploded(BlockState state, World world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) - Mappings:
- Namespace - Name - Mixin selector - named - onExploded- Lnet/minecraft/block/AbstractBlock;onExploded(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/explosion/Explosion;Ljava/util/function/BiConsumer;)V- intermediary - method_55124- Lnet/minecraft/class_4970;method_55124(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1927;Ljava/util/function/BiConsumer;)V- official - a- Ldsd;a(Ldse;Ldca;Liz;Ldbs;Ljava/util/function/BiConsumer;)V
 
- 
onUseprotected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) - Mappings:
- Namespace - Name - Mixin selector - 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/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;- intermediary - method_55766- Lnet/minecraft/class_4970;method_55766(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;- official - a- Ldsd;a(Ldse;Ldca;Liz;Lcmz;Levp;)Lbqw;
 
- 
onUseWithItemprotected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) - Mappings:
- Namespace - Name - Mixin selector - named - onUseWithItem- Lnet/minecraft/block/AbstractBlock;onUseWithItem(Lnet/minecraft/item/ItemStack;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/ItemActionResult;- intermediary - method_55765- Lnet/minecraft/class_4970;method_55765(Lnet/minecraft/class_1799;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_9062;- official - a- Ldsd;a(Lcur;Ldse;Ldca;Liz;Lcmz;Lbqv;Levp;)Lbqy;
 
- 
onSyncedBlockEventprotected boolean onSyncedBlockEvent(BlockState state, World world, BlockPos pos, int type, int data) Handles the block event, which is an event specific to a block with an integer ID and data.- Returns:
- whether the event was handled successfully
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - onSyncedBlockEvent- Lnet/minecraft/block/AbstractBlock;onSyncedBlockEvent(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;II)Z- intermediary - method_9592- Lnet/minecraft/class_4970;method_9592(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;II)Z- official - a- Ldsd;a(Ldse;Ldca;Liz;II)Z
 
- 
getRenderTypeReturns the block's render type (invisible, animated, model).- Returns:
- the block's render type (invisible, animated, model)
- See Also:
- API Note:
- BlockWithEntityoverrides this to return- BlockRenderType.INVISIBLE; therefore, custom blocks extending that class must override it again to render the block.
- Mappings:
- Namespace - Name - Mixin selector - named - getRenderType- Lnet/minecraft/block/AbstractBlock;getRenderType(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockRenderType;- intermediary - method_9604- Lnet/minecraft/class_4970;method_9604(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2464;- official - a_- Ldsd;a_(Ldse;)Ldlh;
 
- 
hasSidedTransparencyReturns whether the block's transparency depends on the side of the block, like slabs.- Returns:
- whether the block's transparency depends on the side of the block, like slabs
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - hasSidedTransparency- Lnet/minecraft/block/AbstractBlock;hasSidedTransparency(Lnet/minecraft/block/BlockState;)Z- intermediary - method_9526- Lnet/minecraft/class_4970;method_9526(Lnet/minecraft/class_2680;)Z- official - f_- Ldsd;f_(Ldse;)Z
 
- 
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.- Returns:
- whether the block is capable of emitting redstone power
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - emitsRedstonePower- Lnet/minecraft/block/AbstractBlock;emitsRedstonePower(Lnet/minecraft/block/BlockState;)Z- intermediary - method_9506- Lnet/minecraft/class_4970;method_9506(Lnet/minecraft/class_2680;)Z- official - e_- Ldsd;e_(Ldse;)Z
 
- 
getFluidStateReturns the state's associated fluid state.Waterloggable blocks must override this to return Fluids.WATER.getStill(false)when waterlogged.- Returns:
- the state's associated fluid state
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getFluidState- Lnet/minecraft/block/AbstractBlock;getFluidState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/fluid/FluidState;- intermediary - method_9545- Lnet/minecraft/class_4970;method_9545(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3610;- official - b_- Ldsd;b_(Ldse;)Lenx;
 
- 
hasComparatorOutputReturns whether the block can have a comparator output.This does not check the current comparator output of the block. Use getComparatorOutput(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)in that case.- Returns:
- whether the block can have a comparator output
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - hasComparatorOutput- Lnet/minecraft/block/AbstractBlock;hasComparatorOutput(Lnet/minecraft/block/BlockState;)Z- intermediary - method_9498- Lnet/minecraft/class_4970;method_9498(Lnet/minecraft/class_2680;)Z- official - c_- Ldsd;c_(Ldse;)Z
 
- 
getMaxHorizontalModelOffsetprotected float getMaxHorizontalModelOffset()- Mappings:
- Namespace - Name - Mixin selector - named - getMaxHorizontalModelOffset- Lnet/minecraft/block/AbstractBlock;getMaxHorizontalModelOffset()F- intermediary - method_32913- Lnet/minecraft/class_4970;method_32913()F- official - aq_- Ldsd;aq_()F
 
- 
getVerticalModelOffsetMultiplierprotected float getVerticalModelOffsetMultiplier()- Mappings:
- Namespace - Name - Mixin selector - named - getVerticalModelOffsetMultiplier- Lnet/minecraft/block/AbstractBlock;getVerticalModelOffsetMultiplier()F- intermediary - method_37247- Lnet/minecraft/class_4970;method_37247()F- official - as_- Ldsd;as_()F
 
- 
getRequiredFeatures- Specified by:
- getRequiredFeaturesin interface- ToggleableFeature
- Mappings:
- Namespace - Name - Mixin selector - named - getRequiredFeatures- Lnet/minecraft/resource/featuretoggle/ToggleableFeature;getRequiredFeatures()Lnet/minecraft/resource/featuretoggle/FeatureSet;- intermediary - method_45322- Lnet/minecraft/class_7695;method_45322()Lnet/minecraft/class_7699;- official - i- Lcpk;i()Lcpn;
 
- 
rotateReturnsstaterotated byrotation.By default, this returns the provided block state. - Returns:
- staterotated by- rotation
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - rotate- Lnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;- intermediary - method_9598- Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;- official - a- Ldsd;a(Ldse;Ldlo;)Ldse;
 
- 
mirrorReturnsstatemirrored bymirror.By default, this returns the provided block state. - Returns:
- statemirrored by- mirror
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - mirror- Lnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;- intermediary - method_9569- Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;- official - a- Ldsd;a(Ldse;Ldjy;)Ldse;
 
- 
canReplaceReturns whether the item can replace the block.By default, this checks if the block allows replacing and whether the item differs from the block's item. Items composed of multiple blocks, such as candles, vines, or snow layers, should override this to implement additional checks. 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.- Returns:
- whether the item can replace the block
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - canReplace- Lnet/minecraft/block/AbstractBlock;canReplace(Lnet/minecraft/block/BlockState;Lnet/minecraft/item/ItemPlacementContext;)Z- intermediary - method_9616- Lnet/minecraft/class_4970;method_9616(Lnet/minecraft/class_2680;Lnet/minecraft/class_1750;)Z- official - a- Ldsd;a(Ldse;Lcyc;)Z
 
- 
canBucketPlaceReturns whether a bucket can replace the block with the fluid.By default, this checks if the block allows replacing or is not solid. Blocks intended to be unbreakable should override this to implement additional checks. 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.- Returns:
- whether a bucket can replace the block with the fluid
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - canBucketPlace- Lnet/minecraft/block/AbstractBlock;canBucketPlace(Lnet/minecraft/block/BlockState;Lnet/minecraft/fluid/Fluid;)Z- intermediary - method_22358- Lnet/minecraft/class_4970;method_22358(Lnet/minecraft/class_2680;Lnet/minecraft/class_3611;)Z- official - a- Ldsd;a(Ldse;Lenw;)Z
 
- 
getDroppedStacksprotected List<ItemStack> getDroppedStacks(BlockState state, LootContextParameterSet.Builder builder) Returns the block's dropped item stacks.The default implementation uses loot tables. Blocks with custom drops should not hardcode the drops; instead, make a new loot table. If the loot table needs an additional context, override this method and modify builderbefore callingsuper.getDroppedStacks. An example of this isShulkerBoxBlock. Note that to prevent item duplication, when appending item stacks to the builder,ItemStack.split(int)should be called.This method should not be used for dropping inventory contents ( onStateReplaced(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, boolean)should be used instead) or to drop experience orbs (onStacksDropped(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.item.ItemStack, boolean)should be used instead).- Returns:
- the block's dropped item stacks
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getDroppedStacks- Lnet/minecraft/block/AbstractBlock;getDroppedStacks(Lnet/minecraft/block/BlockState;Lnet/minecraft/loot/context/LootContextParameterSet$Builder;)Ljava/util/List;- intermediary - method_9560- Lnet/minecraft/class_4970;method_9560(Lnet/minecraft/class_2680;Lnet/minecraft/class_8567$class_8568;)Ljava/util/List;- official - a- Ldsd;a(Ldse;Leqn$a;)Ljava/util/List;
 
- 
getRenderingSeedReturns the seed value for rendering.This is usually the hash code of pos. Tall or wide blocks (such as doors or beds) should override this to make sure both parts of the block have the same seed.- Returns:
- the seed value for rendering
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getRenderingSeed- Lnet/minecraft/block/AbstractBlock;getRenderingSeed(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;)J- intermediary - method_9535- Lnet/minecraft/class_4970;method_9535(Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;)J- official - a- Ldsd;a(Ldse;Liz;)J
 
- 
getCullingShape- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getCullingShape- Lnet/minecraft/block/AbstractBlock;getCullingShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/shape/VoxelShape;- intermediary - method_9571- Lnet/minecraft/class_4970;method_9571(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_265;- official - f- Ldsd;f(Ldse;Ldbg;Liz;)Lewm;
 
- 
getSidesShape- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getSidesShape- Lnet/minecraft/block/AbstractBlock;getSidesShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/shape/VoxelShape;- intermediary - method_25959- Lnet/minecraft/class_4970;method_25959(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_265;- official - b_- Ldsd;b_(Ldse;Ldbg;Liz;)Lewm;
 
- 
getRaycastShape- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getRaycastShape- Lnet/minecraft/block/AbstractBlock;getRaycastShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/shape/VoxelShape;- intermediary - method_9584- Lnet/minecraft/class_4970;method_9584(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_265;- official - a- Ldsd;a(Ldse;Ldbg;Liz;)Lewm;
 
- 
getOpacity- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getOpacity- Lnet/minecraft/block/AbstractBlock;getOpacity(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)I- intermediary - method_9505- Lnet/minecraft/class_4970;method_9505(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)I- official - g- Ldsd;g(Ldse;Ldbg;Liz;)I
 
- 
createScreenHandlerFactory@Nullable protected @Nullable NamedScreenHandlerFactory createScreenHandlerFactory(BlockState state, World world, BlockPos pos) Returns the screen handler factory ornullif screen handler cannot be created.This method should be overridden for blocks with screen handlers, such as anvils. The created screen handler is usually passed to PlayerEntity.openHandledScreen(net.minecraft.screen.NamedScreenHandlerFactory). SeeAnvilBlock.createScreenHandlerFactory(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)for basic usage.BlockWithEntitydelegates this logic to the block entity implementingNamedScreenHandlerFactory. For example, anyBlockWithEntitywhose block entity extendsLockableContainerBlockEntityneeds to overrideLockableContainerBlockEntity.createScreenHandler(int, net.minecraft.entity.player.PlayerInventory)instead of this method.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.- Returns:
- the screen handler factory or nullif screen handler cannot be created
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - createScreenHandlerFactory- Lnet/minecraft/block/AbstractBlock;createScreenHandlerFactory(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/screen/NamedScreenHandlerFactory;- intermediary - method_17454- Lnet/minecraft/class_4970;method_17454(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_3908;- official - b- Ldsd;b(Ldse;Ldca;Liz;)Lbra;
 
- 
canPlaceAtReturns whether the block can be placed atpos.Blocks with supporting block requirements should override this method. Note that this should also be checked manually during 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)in order to break the block that lost its supporting block.This is only checked during the use of block items or by endermen, falling blocks, etc that can place blocks. This does not affect block state changes performed through World.setBlockState(BlockPos, BlockState)call.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.- Returns:
- whether the block can be placed at pos
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - canPlaceAt- Lnet/minecraft/block/AbstractBlock;canPlaceAt(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z- intermediary - method_9558- Lnet/minecraft/class_4970;method_9558(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Z- official - a- Ldsd;a(Ldse;Ldcd;Liz;)Z
 
- 
getAmbientOcclusionLightLevel- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getAmbientOcclusionLightLevel- Lnet/minecraft/block/AbstractBlock;getAmbientOcclusionLightLevel(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)F- intermediary - method_9575- Lnet/minecraft/class_4970;method_9575(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)F- official - d- Ldsd;d(Ldse;Ldbg;Liz;)F
 
- 
getComparatorOutputReturns the comparator output of the block, from0to15.When overriding this, hasComparatorOutput(net.minecraft.block.BlockState)must also be overridden.- Returns:
- the comparator output of the block, from 0to15
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getComparatorOutput- Lnet/minecraft/block/AbstractBlock;getComparatorOutput(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I- intermediary - method_9572- Lnet/minecraft/class_4970;method_9572(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)I- official - a- Ldsd;a(Ldse;Ldca;Liz;)I
 
- 
getOutlineShapeprotected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - See Also:
- Mappings:
- Namespace - Name - Mixin selector - 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;- 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;- official - a- Ldsd;a(Ldse;Ldbg;Liz;Levy;)Lewm;
 
- 
getCollisionShapeprotected VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getCollisionShape- Lnet/minecraft/block/AbstractBlock;getCollisionShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;- intermediary - method_9549- Lnet/minecraft/class_4970;method_9549(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;- official - b- Ldsd;b(Ldse;Ldbg;Liz;Levy;)Lewm;
 
- 
isShapeFullCube- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - isShapeFullCube- Lnet/minecraft/block/AbstractBlock;isShapeFullCube(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z- intermediary - method_37403- Lnet/minecraft/class_4970;method_37403(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Z- official - c- Ldsd;c(Ldse;Ldbg;Liz;)Z
 
- 
isCullingShapeFullCube- Mappings:
- Namespace - Name - Mixin selector - named - isCullingShapeFullCube- Lnet/minecraft/block/AbstractBlock;isCullingShapeFullCube(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z- intermediary - method_42326- Lnet/minecraft/class_4970;method_42326(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Z- official - h- Ldsd;h(Ldse;Ldbg;Liz;)Z
 
- 
getCameraCollisionShapeprotected VoxelShape getCameraCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getCameraCollisionShape- Lnet/minecraft/block/AbstractBlock;getCameraCollisionShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;- intermediary - method_26159- Lnet/minecraft/class_4970;method_26159(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;- official - c- Ldsd;c(Ldse;Ldbg;Liz;Levy;)Lewm;
 
- 
randomTickCalled server-side when a block gets ticked randomly. This can be overridden to implement various logics, most commonly plant growth. Default implementation does nothing. To control the rate of the action, userandom.Random tick speed is controlled by the game rule randomTickSpeedand can be disabled. Only blocks within 128-block cylinder (i.e. ignoring Y coordinates) around players receive random ticks.Blocks overriding this must use AbstractBlock.Settings.ticksRandomly()block settings.Here are some examples: - SugarCaneBlockuses this to grow sugar cane.
- OxidizableBlockuses this to oxidize.
- NetherPortalBlockuses this to spawn zombified piglins.
- LeavesBlockuses this to decay when far from logs.
 - See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - randomTick- Lnet/minecraft/block/AbstractBlock;randomTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V- intermediary - method_9514- Lnet/minecraft/class_4970;method_9514(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V- official - b- Ldsd;b(Ldse;Larf;Liz;Lazh;)V
 
- 
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).Scheduled ticks are often used inside 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.
 - See Also:
- Mappings:
- Namespace - Name - Mixin selector - 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- 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- official - a- Ldsd;a(Ldse;Larf;Liz;Lazh;)V
 
- 
calcBlockBreakingDeltaprotected float calcBlockBreakingDelta(BlockState state, PlayerEntity player, BlockView world, BlockPos pos) - See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - calcBlockBreakingDelta- Lnet/minecraft/block/AbstractBlock;calcBlockBreakingDelta(Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)F- intermediary - method_9594- Lnet/minecraft/class_4970;method_9594(Lnet/minecraft/class_2680;Lnet/minecraft/class_1657;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)F- official - a- Ldsd;a(Ldse;Lcmz;Ldbg;Liz;)F
 
- 
onStacksDroppedprotected void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion. This is mostly overridden to drop experience orbs. To change the dropped item stacks, use loot tables orgetDroppedStacks(net.minecraft.block.BlockState, net.minecraft.loot.context.LootContextParameterSet.Builder). To drop inventory contents, useonStateReplaced(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, boolean)instead.Experience orbs should only be dropped if dropExperienceistrue.Block.dropExperienceWhenMined(net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.item.ItemStack, net.minecraft.util.math.intprovider.IntProvider)can be used to drop experience orbs.ExperienceDroppingBlockprovides the implementation for experience-dropping blocks.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - onStacksDropped- Lnet/minecraft/block/AbstractBlock;onStacksDropped(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/item/ItemStack;Z)V- intermediary - method_9565- Lnet/minecraft/class_4970;method_9565(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_1799;Z)V- official - a- Ldsd;a(Ldse;Larf;Liz;Lcur;Z)V
 
- 
onBlockBreakStartCalled when a player starts breaking the block (including when instant-mining).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.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - onBlockBreakStart- Lnet/minecraft/block/AbstractBlock;onBlockBreakStart(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)V- intermediary - method_9606- Lnet/minecraft/class_4970;method_9606(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;)V- official - a- Ldsd;a(Ldse;Ldca;Liz;Lcmz;)V
 
- 
getWeakRedstonePowerprotected 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 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.- Returns:
- the weak redstone power emitted from the block
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - 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- 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- official - a- Ldsd;a(Ldse;Ldbg;Liz;Lje;)I
 
- 
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.
 - See Also:
- Mappings:
- Namespace - Name - Mixin selector - 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- 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- official - a- Ldsd;a(Ldse;Ldca;Liz;Lbsw;)V
 
- 
getStrongRedstonePowerprotected 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 emitsRedstonePower(net.minecraft.block.BlockState)to returntrue.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.- Returns:
- the strong redstone power emitted from the block
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - 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- 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- official - b- Ldsd;b(Ldse;Ldbg;Liz;Lje;)I
 
- 
getLootTableKey- Mappings:
- Namespace - Name - Mixin selector - named - getLootTableKey- Lnet/minecraft/block/AbstractBlock;getLootTableKey()Lnet/minecraft/registry/RegistryKey;- intermediary - method_26162- Lnet/minecraft/class_4970;method_26162()Lnet/minecraft/class_5321;- official - v- Ldsd;v()Lale;
 
- 
onProjectileHitprotected void onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile) Called when aProjectileEntityhits a block.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: - TargetBlockactivates.
- BellBlockrings.
- LightningRodBlockspawns a lightning.
- AbstractCandleBlocklights on fire when hit by a projectile on fire.
 - See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - onProjectileHit- Lnet/minecraft/block/AbstractBlock;onProjectileHit(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/hit/BlockHitResult;Lnet/minecraft/entity/projectile/ProjectileEntity;)V- intermediary - method_19286- Lnet/minecraft/class_4970;method_19286(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_3965;Lnet/minecraft/class_1676;)V- official - a- Ldsd;a(Ldca;Ldse;Levp;Lcnr;)V
 
- 
isTransparent- Mappings:
- Namespace - Name - Mixin selector - named - isTransparent- Lnet/minecraft/block/AbstractBlock;isTransparent(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z- intermediary - method_9579- Lnet/minecraft/class_4970;method_9579(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Z- official - a_- Ldsd;a_(Ldse;Ldbg;Liz;)Z
 
- 
hasRandomTicks- Mappings:
- Namespace - Name - Mixin selector - named - hasRandomTicks- Lnet/minecraft/block/AbstractBlock;hasRandomTicks(Lnet/minecraft/block/BlockState;)Z- intermediary - method_9542- Lnet/minecraft/class_4970;method_9542(Lnet/minecraft/class_2680;)Z- official - d_- Ldsd;d_(Ldse;)Z
 
- 
getSoundGroup- Mappings:
- Namespace - Name - Mixin selector - named - getSoundGroup- Lnet/minecraft/block/AbstractBlock;getSoundGroup(Lnet/minecraft/block/BlockState;)Lnet/minecraft/sound/BlockSoundGroup;- intermediary - method_9573- Lnet/minecraft/class_4970;method_9573(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2498;- official - g_- Ldsd;g_(Ldse;)Ldmo;
 
- 
asItemReturns the block's corresponding item.This is not affected by loot tables. Blocks without corresponding items, such as piston head, will return Items.AIR.- Returns:
- the block's corresponding item
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - asItem- Lnet/minecraft/block/AbstractBlock;asItem()Lnet/minecraft/item/Item;- intermediary - method_8389- Lnet/minecraft/class_4970;method_8389()Lnet/minecraft/class_1792;- official - r- Ldsd;r()Lcum;
 
- 
asBlockReturns the block asBlock.This is used for casting purposes. - Returns:
- the block as Block
- Mappings:
- Namespace - Name - Mixin selector - named - asBlock- Lnet/minecraft/block/AbstractBlock;asBlock()Lnet/minecraft/block/Block;- intermediary - method_26160- Lnet/minecraft/class_4970;method_26160()Lnet/minecraft/class_2248;- official - q- Ldsd;q()Ldfb;
 
- 
getDefaultMapColor- Mappings:
- Namespace - Name - Mixin selector - named - getDefaultMapColor- Lnet/minecraft/block/AbstractBlock;getDefaultMapColor()Lnet/minecraft/block/MapColor;- intermediary - method_26403- Lnet/minecraft/class_4970;method_26403()Lnet/minecraft/class_3620;- official - w- Ldsd;w()Leob;
 
- 
getHardnesspublic float getHardness()- Mappings:
- Namespace - Name - Mixin selector - named - getHardness- Lnet/minecraft/block/AbstractBlock;getHardness()F- intermediary - method_36555- Lnet/minecraft/class_4970;method_36555()F- official - x- Ldsd;x()F
 
 
-