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.BlockStatePairKey
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 DirectionProperty
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_SUPPRESS_DROPS
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
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 level, BlockPos pos) void
animateTick
(BlockState state, Level level, BlockPos pos, RandomSource random) 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 level, BlockPos pos) protected int
getAnalogOutputSignal
(BlockState blockState, Level level, BlockPos pos) Returns the analog signal this block emits.getDrops
(BlockState state, LootParams.Builder params) protected RenderShape
getRenderShape
(BlockState state) The type of render function called.getStateForPlacement
(BlockPlaceContext context) <T extends BlockEntity>
BlockEntityTicker<T> getTicker
(Level level, BlockState state, BlockEntityType<T> blockEntityType) protected boolean
hasAnalogOutputSignal
(BlockState state) private boolean
hiveContainsBees
(Level level, BlockPos pos) mirror
(BlockState state, Mirror mirror) Returns the blockstate with the given mirror of the passed blockstate.newBlockEntity
(BlockPos pos, BlockState state) void
playerDestroy
(Level level, Player player, BlockPos pos, BlockState state, BlockEntity te, ItemStack stack) Called after a player has successfully harvested this block.playerWillDestroy
(Level level, BlockPos pos, BlockState state, Player player) void
releaseBeesAndResetHoneyLevel
(Level level, BlockState state, BlockPos pos, Player player, BeehiveBlockEntity.BeeReleaseStatus beeReleaseStatus) void
resetHoneyLevel
(Level level, BlockState state, BlockPos pos) rotate
(BlockState state, Rotation rotation) Returns the blockstate with the given rotation from the passed blockstate.private void
spawnFluidParticle
(Level particleData, double x1, double x2, double z1, double z2, double y) private void
spawnParticle
(Level level, BlockPos pos, VoxelShape shape, double y) private void
trySpawnDripParticles
(Level level, BlockPos pos, BlockState state) protected BlockState
updateShape
(BlockState state, Direction facing, BlockState facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) Update the provided state given the provided neighbor direction and neighbor state, returning a new state.protected ItemInteractionResult
useItemOn
(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) Methods inherited from class net.minecraft.world.level.block.BaseEntityBlock
createTickerHelper, getMenuProvider, triggerEvent
Methods inherited from class net.minecraft.world.level.block.Block
appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getOcclusionShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, neighborChanged, onExplosionHit, onPlace, onProjectileHit, onRemove, 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, 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
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 level, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity te, ItemStack stack) 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
-
angerNearbyBees
-
dropHoneycomb
-
useItemOn
protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) - Overrides:
useItemOn
in classBlockBehaviour
-
hiveContainsBees
-
releaseBeesAndResetHoneyLevel
public void releaseBeesAndResetHoneyLevel(Level level, BlockState state, BlockPos pos, @Nullable Player player, BeehiveBlockEntity.BeeReleaseStatus beeReleaseStatus) -
resetHoneyLevel
-
animateTick
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 particleData, double x1, double x2, double z1, double z2, double y) -
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
getRenderShape
The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only, LIQUID for vanilla liquids, INVISIBLE to skip all rendering- Overrides:
getRenderShape
in classBaseEntityBlock
-
newBlockEntity
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState state, BlockEntityType<T> blockEntityType) -
playerWillDestroy
- Overrides:
playerWillDestroy
in classBlock
-
getDrops
- Overrides:
getDrops
in classBlockBehaviour
-
updateShape
protected BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) Update the provided state given the provided neighbor direction and neighbor state, returning a new state. For example, fences make their connections to the passed in state if possible, and wet concrete powder immediately returns its solidified counterpart. Note that this method should ideally consider only the specific direction passed in.- Overrides:
updateShape
in classBlockBehaviour
-
rotate
Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
rotate
in classBlockBehaviour
-
mirror
Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
mirror
in classBlockBehaviour
-