Class BeehiveBlock
- All Implemented Interfaces:
- BlockEntityProvider,- ItemConvertible,- ToggleableFeature
- Mappings:
- Namespace - Name - named - net/minecraft/block/BeehiveBlock- intermediary - net/minecraft/class_4481- official - dev
- 
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 TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BeehiveBlock> private static final intstatic final DirectionPropertystatic final intstatic final IntPropertyFields inherited from class net.minecraft.block.Blockfield_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlockcollidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureFEATURE_ENABLED_REGISTRY_KEYS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidaddHoneyParticle(World world, double minX, double maxX, double minZ, double maxZ, double height) private voidaddHoneyParticle(World world, BlockPos pos, VoxelShape shape, double height) voidafterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) Called server-side when the block is broken by the player using correct tool.private voidangerNearbyBees(World world, BlockPos pos) protected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.createBlockEntity(BlockPos pos, BlockState state) Returns a new block entity instance.static voiddropHoneycomb(World world, BlockPos pos) com.mojang.serialization.MapCodec<BeehiveBlock> getCodec()protected intgetComparatorOutput(BlockState state, World world, BlockPos pos) Returns the comparator output of the block, from0to15.getDroppedStacks(BlockState state, LootContextParameterSet.Builder builder) Returns the block's dropped item stacks.protected BlockRenderTypegetRenderType(BlockState state) Returns the block's render type (invisible, animated, model).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.<T extends BlockEntity>
 @Nullable BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) Returns the "ticker" for the block's block entity, ornullif the block entity does not need to be ticked.private booleanprotected booleanhasComparatorOutput(BlockState state) Returns whether the block can have a comparator output.mirror(BlockState state, BlockMirror mirror) Returnsstatemirrored bymirror.onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.protected ItemActionResultonUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) voidrandomDisplayTick(BlockState state, World world, BlockPos pos, Random random) Called randomly on the client.rotate(BlockState state, BlockRotation rotation) Returnsstaterotated byrotation.private voidspawnHoneyParticles(World world, BlockPos pos, BlockState state) voidtakeHoney(World world, BlockState state, BlockPos pos) voidtakeHoney(World world, BlockState state, BlockPos pos, @Nullable PlayerEntity player, BeehiveBlockEntity.BeeState beeState) Methods inherited from class net.minecraft.block.BlockWithEntitycreateScreenHandlerFactory, onSyncedBlockEvent, validateTickerMethods inherited from class net.minecraft.block.BlockappendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlockcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createCodec, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getCullingShape, getDefaultMapColor, getFluidState, getHardness, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getOutlineShape, getRaycastShape, getRenderingSeed, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasRandomTicks, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, isTransparent, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onUse, prepare, randomTick, scheduledTickMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.BlockEntityProvidergetGameEventListenerMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureisEnabled
- 
Field Details- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - named - CODEC- Lnet/minecraft/block/BeehiveBlock;CODEC:Lcom/mojang/serialization/MapCodec;- intermediary - field_46274- Lnet/minecraft/class_4481;field_46274:Lcom/mojang/serialization/MapCodec;- official - a- Ldev;a:Lcom/mojang/serialization/MapCodec;
 
- 
FACING- Mappings:
- Namespace - Name - Mixin selector - named - FACING- Lnet/minecraft/block/BeehiveBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;- intermediary - field_20419- Lnet/minecraft/class_4481;field_20419:Lnet/minecraft/class_2753;- official - b- Ldev;b:Ldsy;
 
- 
HONEY_LEVEL- Mappings:
- Namespace - Name - Mixin selector - named - HONEY_LEVEL- Lnet/minecraft/block/BeehiveBlock;HONEY_LEVEL:Lnet/minecraft/state/property/IntProperty;- intermediary - field_20420- Lnet/minecraft/class_4481;field_20420:Lnet/minecraft/class_2758;- official - c- Ldev;c:Ldte;
 
- 
FULL_HONEY_LEVELpublic static final int FULL_HONEY_LEVEL- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - FULL_HONEY_LEVEL- Lnet/minecraft/block/BeehiveBlock;FULL_HONEY_LEVEL:I- intermediary - field_31011- Lnet/minecraft/class_4481;field_31011:I- official - d- Ldev;d:I
 
- 
DROPPED_HONEYCOMB_COUNTprivate static final int DROPPED_HONEYCOMB_COUNT- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - DROPPED_HONEYCOMB_COUNT- Lnet/minecraft/block/BeehiveBlock;DROPPED_HONEYCOMB_COUNT:I- intermediary - field_31012- Lnet/minecraft/class_4481;field_31012:I- official - e- Ldev;e:I
 
 
- 
- 
Constructor Details- 
BeehiveBlock- 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- 
getCodec- Specified by:
- getCodecin class- BlockWithEntity
- 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;
 
- 
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.- Overrides:
- hasComparatorOutputin class- AbstractBlock
- 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
 
- 
getComparatorOutputReturns the comparator output of the block, from0to15.When overriding this, hasComparatorOutput(net.minecraft.block.BlockState)must also be overridden.- Overrides:
- getComparatorOutputin class- AbstractBlock
- 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
 
- 
afterBreakpublic void afterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable @Nullable BlockEntity blockEntity, ItemStack tool) Called server-side when the block is broken by the player using correct tool. This is called afterBlock.onBroken(net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState)but has the tool requirement. By default, this incrementsStats.MINED, adds exhaustion to the player, and drops the block's item stacks.Subclasses should override this if breaking the block causes another block to be placed (like IceBlock) or if the block can break multiple times (likeTurtleEggBlock).BeehiveBlockuses this to anger the bees if the hive is mined without silk touch.- Overrides:
- afterBreakin class- Block
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - afterBreak- Lnet/minecraft/block/Block;afterBreak(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BlockEntity;Lnet/minecraft/item/ItemStack;)V- intermediary - method_9556- Lnet/minecraft/class_2248;method_9556(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2586;Lnet/minecraft/class_1799;)V- official - a- Ldfb;a(Ldca;Lcmz;Liz;Ldse;Ldpj;Lcur;)V
 
- 
angerNearbyBees- Mappings:
- Namespace - Name - Mixin selector - named - angerNearbyBees- Lnet/minecraft/block/BeehiveBlock;angerNearbyBees(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V- intermediary - method_23893- Lnet/minecraft/class_4481;method_23893(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V- official - b- Ldev;b(Ldca;Liz;)V
 
- 
dropHoneycomb- Mappings:
- Namespace - Name - Mixin selector - named - dropHoneycomb- Lnet/minecraft/block/BeehiveBlock;dropHoneycomb(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V- intermediary - method_21842- Lnet/minecraft/class_4481;method_21842(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V- official - a- Ldev;a(Ldca;Liz;)V
 
- 
onUseWithItemprotected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) - Overrides:
- onUseWithItemin class- AbstractBlock
- 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;
 
- 
hasBees- Mappings:
- Namespace - Name - Mixin selector - named - hasBees- Lnet/minecraft/block/BeehiveBlock;hasBees(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Z- intermediary - method_23894- Lnet/minecraft/class_4481;method_23894(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Z- official - c- Ldev;c(Ldca;Liz;)Z
 
- 
takeHoneypublic void takeHoney(World world, BlockState state, BlockPos pos, @Nullable @Nullable PlayerEntity player, BeehiveBlockEntity.BeeState beeState) - Mappings:
- Namespace - Name - Mixin selector - named - takeHoney- Lnet/minecraft/block/BeehiveBlock;takeHoney(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/block/entity/BeehiveBlockEntity$BeeState;)V- intermediary - method_21841- Lnet/minecraft/class_4481;method_21841(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_4482$class_4484;)V- official - a- Ldev;a(Ldca;Ldse;Liz;Lcmz;Ldpg$b;)V
 
- 
takeHoney- Mappings:
- Namespace - Name - Mixin selector - named - takeHoney- Lnet/minecraft/block/BeehiveBlock;takeHoney(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;)V- intermediary - method_23754- Lnet/minecraft/class_4481;method_23754(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;)V- official - a- Ldev;a(Ldca;Ldse;Liz;)V
 
- 
randomDisplayTickCalled randomly on the client. Blocks may override this to spawn particles. UnlikeAbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)this is not affected by a game rule.- Overrides:
- randomDisplayTickin class- Block
- Mappings:
- Namespace - Name - Mixin selector - named - randomDisplayTick- Lnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V- intermediary - method_9496- Lnet/minecraft/class_2248;method_9496(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V- official - a- Ldfb;a(Ldse;Ldca;Liz;Lazh;)V
 
- 
spawnHoneyParticles- Mappings:
- Namespace - Name - Mixin selector - named - spawnHoneyParticles- Lnet/minecraft/block/BeehiveBlock;spawnHoneyParticles(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V- intermediary - method_21843- Lnet/minecraft/class_4481;method_21843(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V- official - a- Ldev;a(Ldca;Liz;Ldse;)V
 
- 
addHoneyParticle- Mappings:
- Namespace - Name - Mixin selector - named - addHoneyParticle- Lnet/minecraft/block/BeehiveBlock;addHoneyParticle(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/shape/VoxelShape;D)V- intermediary - method_21844- Lnet/minecraft/class_4481;method_21844(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_265;D)V- official - a- Ldev;a(Ldca;Liz;Lewm;D)V
 
- 
addHoneyParticleprivate void addHoneyParticle(World world, double minX, double maxX, double minZ, double maxZ, double height) - Mappings:
- Namespace - Name - Mixin selector - named - addHoneyParticle- Lnet/minecraft/block/BeehiveBlock;addHoneyParticle(Lnet/minecraft/world/World;DDDDD)V- intermediary - method_21840- Lnet/minecraft/class_4481;method_21840(Lnet/minecraft/class_1937;DDDDD)V- official - a- Ldev;a(Ldca;DDDDD)V
 
- 
getPlacementState- Overrides:
- getPlacementStatein class- Block
- Mappings:
- Namespace - Name - Mixin selector - named - getPlacementState- Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;- intermediary - method_9605- Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;- official - a- Ldfb;a(Lcyc;)Ldse;
 
- 
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 - named - appendProperties- Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V- intermediary - method_9515- Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V- official - a- Ldfb;a(Ldsf$a;)V
 
- 
getRenderTypeReturns the block's render type (invisible, animated, model).- Overrides:
- getRenderTypein class- BlockWithEntity
- 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;
 
- 
createBlockEntityReturns a new block entity instance.For example: @Override public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { return new MyBlockEntity(pos, state); }- Returns:
- a new block entity instance
- Implementation Note:
- While this is marked as nullable, in practice this should never return
 null.PistonExtensionBlockis the only block in vanilla that returnsnullinside the implementation.
- Mappings:
- Namespace - Name - Mixin selector - named - createBlockEntity- Lnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;- intermediary - method_10123- Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;- official - a- Ldht;a(Liz;Ldse;)Ldpj;
 
- 
getTicker@Nullable public <T extends BlockEntity> @Nullable BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) Returns the "ticker" for the block's block entity, ornullif the block entity does not need to be ticked.Ticker is a functional interface called every tick to tick the block entity on both the client and the server. Tickers should validate that the passed typeis the one this block expects, and returnnullif it isn't. This is to prevent crashes in rare cases where a mismatch occurs between the position's block and block entity.BlockWithEntity.validateTicker(net.minecraft.block.entity.BlockEntityType<A>, net.minecraft.block.entity.BlockEntityType<E>, net.minecraft.block.entity.BlockEntityTicker<? super E>)can be used to implement the check.Example: public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) { if (type != YourMod.MY_BLOCK_ENTITY_TYPE) return null; // This should be a static method usable as a BlockEntityTicker. return YourBlockEntity::tick; }- Returns:
- the "ticker" for the block's block entity, or nullif the block entity does not need to be ticked
- Mappings:
- Namespace - Name - Mixin selector - named - getTicker- Lnet/minecraft/block/BlockEntityProvider;getTicker(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BlockEntityType;)Lnet/minecraft/block/entity/BlockEntityTicker;- intermediary - method_31645- Lnet/minecraft/class_2343;method_31645(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2591;)Lnet/minecraft/class_5558;- official - a- Ldht;a(Ldca;Ldse;Ldpl;)Ldpk;
 
- 
onBreakCalled when a player breaks a block before the block is removed from the world. Explosions do not trigger this.Default implementation spawns block breaking particles, angers piglins, and emits game events. Tall or wide blocks such as doors or beds should override this to break the other part (along with 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).)In most cases, AbstractBlock.onStateReplaced(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, boolean)orAbstractBlock.onStacksDropped(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.item.ItemStack, boolean)should be used instead. Note that they are called when blocks are broken by explosions as well as players breaking them.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.- Overrides:
- onBreakin class- Block
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - onBreak- Lnet/minecraft/block/Block;onBreak(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/block/BlockState;- intermediary - method_9576- Lnet/minecraft/class_2248;method_9576(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1657;)Lnet/minecraft/class_2680;- official - a- Ldfb;a(Ldca;Liz;Ldse;Lcmz;)Ldse;
 
- 
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 ( AbstractBlock.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 (AbstractBlock.onStacksDropped(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.item.ItemStack, boolean)should be used instead).- Overrides:
- getDroppedStacksin class- AbstractBlock
- 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;
 
- 
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 withAbstractBlock.canPlaceAt(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 AbstractBlock.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.
 - Overrides:
- getStateForNeighborUpdatein class- AbstractBlock
- 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;
 
- 
rotateReturnsstaterotated byrotation.By default, this returns the provided block state. - Overrides:
- rotatein class- AbstractBlock
- 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. - Overrides:
- mirrorin class- AbstractBlock
- 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;
 
 
-