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.ShapePairKey
Nested 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 IntegerProperty
static final int
private static final int
Fields 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_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPS
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
angerNearbyBees
(Level pLevel, BlockPos pPos) void
animateTick
(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).com.mojang.serialization.MapCodec
<BeehiveBlock> codec()
protected void
static void
dropHoneycomb
(Level pLevel, BlockPos pPos) protected int
getAnalogOutputSignal
(BlockState pBlockState, Level pLevel, BlockPos pPos) Returns the analog signal this block emits.protected ItemStack
getCloneItemStack
(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 boolean
hasAnalogOutputSignal
(BlockState pState) private boolean
hiveContainsBees
(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 void
onExplosionHit
(BlockState p_364770_, ServerLevel p_364089_, BlockPos p_363677_, Explosion p_365390_, BiConsumer<ItemStack, BlockPos> p_360830_) void
playerDestroy
(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_) void
releaseBeesAndResetHoneyLevel
(Level pLevel, BlockState pState, BlockPos pPos, Player pPlayer, BeehiveBlockEntity.BeeReleaseStatus pBeeReleaseStatus) void
resetHoneyLevel
(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 void
spawnFluidParticle
(Level pParticleData, double pX1, double pX2, double pZ1, double pZ2, double pY) private void
spawnParticle
(Level pLevel, BlockPos pPos, VoxelShape pShape, double pY) private void
trySpawnDripParticles
(Level pLevel, BlockPos pPos, BlockState pState) 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_) protected InteractionResult
useItemOn
(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, triggerEvent
Methods inherited from class net.minecraft.world.level.block.Block
asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, 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, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
affectNeighborsAfterRemoval, 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, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, tick, updateIndirectNeighbourShapes, useShapeForLightOcclusion, useWithoutItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.block.EntityBlock
getListener
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods 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, playFallSound, playStepSound, 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:
codec
in classBaseEntityBlock
-
hasAnalogOutputSignal
- Overrides:
hasAnalogOutputSignal
in classBlockBehaviour
-
getAnalogOutputSignal
Description copied from class:BlockBehaviour
Returns the analog signal this block emits. This is the signal a comparator can read from it.- Overrides:
getAnalogOutputSignal
in classBlockBehaviour
-
playerDestroy
public void playerDestroy(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, @Nullable BlockEntity pTe, ItemStack pStack) Description copied from class:Block
Called 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:
playerDestroy
in classBlock
-
onExplosionHit
protected void onExplosionHit(BlockState p_364770_, ServerLevel p_364089_, BlockPos p_363677_, Explosion p_365390_, BiConsumer<ItemStack, BlockPos> p_360830_) - Overrides:
onExplosionHit
in 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:
useItemOn
in 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:Block
Called periodically clientside on blocks near the player to show effects (like furnace fire particles).- Overrides:
animateTick
in classBlock
-
trySpawnDripParticles
-
spawnParticle
-
spawnFluidParticle
private void spawnFluidParticle(Level pParticleData, double pX1, double pX2, double pZ1, double pZ2, double pY) -
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in 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:
playerWillDestroy
in classBlock
-
getDrops
- Overrides:
getDrops
in classBlockBehaviour
-
getCloneItemStack
protected ItemStack getCloneItemStack(LevelReader p_386459_, BlockPos p_387055_, BlockState p_387788_, boolean p_387391_) - Overrides:
getCloneItemStack
in 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:
updateShape
in classBlockBehaviour
-
rotate
Description copied from class:BlockBehaviour
Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
rotate
in classBlockBehaviour
-
mirror
Description copied from class:BlockBehaviour
Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
mirror
in classBlockBehaviour
-