Package net.minecraft.world.level.block
Class BeehiveBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BaseEntityBlock
net.minecraft.world.level.block.BeehiveBlock
- All Implemented Interfaces:
FeatureElement,EntityBlock,ItemLike,IBlockExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.ShapePairKeyNested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BeehiveBlock> static final EnumProperty<Direction> static final IntegerPropertystatic final intprivate static final intFields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidangerNearbyBees(Level pLevel, BlockPos pPos) voidanimateTick(BlockState p_220773_, Level p_220774_, BlockPos p_220775_, RandomSource p_220776_) Called periodically clientside on blocks near the player to show effects (like furnace fire particles).voidappendHoverText(ItemStack p_368727_, Item.TooltipContext p_368610_, List<Component> p_368681_, TooltipFlag p_368553_) com.mojang.serialization.MapCodec<BeehiveBlock> codec()protected voidstatic voiddropHoneycomb(Level pLevel, BlockPos pPos) protected intgetAnalogOutputSignal(BlockState pBlockState, Level pLevel, BlockPos pPos) Returns the analog signal this block emits.protected ItemStackgetCloneItemStack(LevelReader p_386459_, BlockPos p_387055_, BlockState p_387788_, boolean p_387391_) getDrops(BlockState p_49636_, LootParams.Builder p_287581_) getStateForPlacement(BlockPlaceContext pContext) <T extends BlockEntity>
BlockEntityTicker<T> getTicker(Level p_152180_, BlockState p_152181_, BlockEntityType<T> p_152182_) protected booleanhasAnalogOutputSignal(BlockState pState) private booleanhiveContainsBees(Level pLevel, BlockPos pPos) mirror(BlockState p_304677_, Mirror p_304660_) Returns the blockstate with the given mirror of the passed blockstate.newBlockEntity(BlockPos p_152184_, BlockState p_152185_) protected voidonExplosionHit(BlockState p_364770_, ServerLevel p_364089_, BlockPos p_363677_, Explosion p_365390_, BiConsumer<ItemStack, BlockPos> p_360830_) voidplayerDestroy(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, BlockEntity pTe, ItemStack pStack) Called after a player has successfully harvested this block.playerWillDestroy(Level p_49608_, BlockPos p_49609_, BlockState p_49610_, Player p_49611_) voidreleaseBeesAndResetHoneyLevel(Level pLevel, BlockState pState, BlockPos pPos, Player pPlayer, BeehiveBlockEntity.BeeReleaseStatus pBeeReleaseStatus) voidresetHoneyLevel(Level pLevel, BlockState pState, BlockPos pPos) rotate(BlockState p_304785_, Rotation p_304624_) Returns the blockstate with the given rotation from the passed blockstate.private voidspawnFluidParticle(Level pParticleData, double pX1, double pX2, double pZ1, double pZ2, double pY) private voidspawnParticle(Level pLevel, BlockPos pPos, VoxelShape pShape, double pY) private voidtrySpawnDripParticles(Level pLevel, BlockPos pPos, BlockState pState) protected BlockStateupdateShape(BlockState p_49639_, LevelReader p_374043_, ScheduledTickAccess p_374351_, BlockPos p_49643_, Direction p_49640_, BlockPos p_49644_, BlockState p_49641_, RandomSource p_374258_) protected InteractionResultuseItemOn(ItemStack p_316844_, BlockState p_316365_, Level p_316306_, BlockPos p_316497_, Player p_316824_, InteractionHand p_316436_, BlockHitResult p_316125_) Methods inherited from class net.minecraft.world.level.block.BaseEntityBlock
createTickerHelper, getMenuProvider, triggerEventMethods inherited from class net.minecraft.world.level.block.Block
asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getBlockSupportShape, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, neighborChanged, onPlace, onProjectileHit, onRemove, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, tick, updateIndirectNeighbourShapes, useShapeForLightOcclusion, useWithoutItemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlock
getListenerMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
-
Field Details
-
CODEC
-
FACING
-
HONEY_LEVEL
-
MAX_HONEY_LEVELS
public static final int MAX_HONEY_LEVELS- See Also:
-
SHEARED_HONEYCOMB_COUNT
private static final int SHEARED_HONEYCOMB_COUNT- See Also:
-
-
Constructor Details
-
BeehiveBlock
-
-
Method Details
-
codec
- Specified by:
codecin classBaseEntityBlock
-
hasAnalogOutputSignal
- Overrides:
hasAnalogOutputSignalin classBlockBehaviour
-
getAnalogOutputSignal
Description copied from class:BlockBehaviourReturns the analog signal this block emits. This is the signal a comparator can read from it.- Overrides:
getAnalogOutputSignalin classBlockBehaviour
-
playerDestroy
public void playerDestroy(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, @Nullable BlockEntity pTe, ItemStack pStack) Description copied from class:BlockCalled after a player has successfully harvested this block. This method will only be called if the player has used the correct tool and drops should be spawned.- Overrides:
playerDestroyin classBlock
-
onExplosionHit
protected void onExplosionHit(BlockState p_364770_, ServerLevel p_364089_, BlockPos p_363677_, Explosion p_365390_, BiConsumer<ItemStack, BlockPos> p_360830_) - Overrides:
onExplosionHitin classBlockBehaviour
-
angerNearbyBees
-
dropHoneycomb
-
useItemOn
protected InteractionResult useItemOn(ItemStack p_316844_, BlockState p_316365_, Level p_316306_, BlockPos p_316497_, Player p_316824_, InteractionHand p_316436_, BlockHitResult p_316125_) - Overrides:
useItemOnin classBlockBehaviour
-
hiveContainsBees
-
releaseBeesAndResetHoneyLevel
public void releaseBeesAndResetHoneyLevel(Level pLevel, BlockState pState, BlockPos pPos, @Nullable Player pPlayer, BeehiveBlockEntity.BeeReleaseStatus pBeeReleaseStatus) -
resetHoneyLevel
-
animateTick
public void animateTick(BlockState p_220773_, Level p_220774_, BlockPos p_220775_, RandomSource p_220776_) Description copied from class:BlockCalled periodically clientside on blocks near the player to show effects (like furnace fire particles).- Overrides:
animateTickin classBlock
-
trySpawnDripParticles
-
spawnParticle
-
spawnFluidParticle
private void spawnFluidParticle(Level pParticleData, double pX1, double pX2, double pZ1, double pZ2, double pY) -
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
newBlockEntity
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_152180_, BlockState p_152181_, BlockEntityType<T> p_152182_) -
playerWillDestroy
public BlockState playerWillDestroy(Level p_49608_, BlockPos p_49609_, BlockState p_49610_, Player p_49611_) - Overrides:
playerWillDestroyin classBlock
-
getDrops
- Overrides:
getDropsin classBlockBehaviour
-
getCloneItemStack
protected ItemStack getCloneItemStack(LevelReader p_386459_, BlockPos p_387055_, BlockState p_387788_, boolean p_387391_) - Overrides:
getCloneItemStackin classBlockBehaviour
-
updateShape
protected BlockState updateShape(BlockState p_49639_, LevelReader p_374043_, ScheduledTickAccess p_374351_, BlockPos p_49643_, Direction p_49640_, BlockPos p_49644_, BlockState p_49641_, RandomSource p_374258_) - Overrides:
updateShapein classBlockBehaviour
-
rotate
Description copied from class:BlockBehaviourReturns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
rotatein classBlockBehaviour
-
mirror
Description copied from class:BlockBehaviourReturns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
mirrorin classBlockBehaviour
-
appendHoverText
public void appendHoverText(ItemStack p_368727_, Item.TooltipContext p_368610_, List<Component> p_368681_, TooltipFlag p_368553_) - Overrides:
appendHoverTextin classBlock
-