Class BeehiveBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BeehiveBlockEntity
- All Implemented Interfaces:
DebugValueSource,IAttachmentHolder,IBlockEntityExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classstatic enumstatic final recordNested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.BlockEntityPathElementNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface net.minecraft.util.debug.DebugValueSource
DebugValueSource.Registration, DebugValueSource.ValueGetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String(package private) static final org.slf4j.Loggerstatic final intprivate static final intstatic final intprivate static final intprivate BlockPosprivate final List<BeehiveBlockEntity.BeeData> private static final StringFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOccupant(Bee pBee) protected voidapplyImplicitComponents(DataComponentGetter p_397481_) protected voidvoidemptyAllLivingFromHive(Player pPlayer, BlockState pState, BeehiveBlockEntity.BeeReleaseStatus pReleaseStatus) private List<BeehiveBlockEntity.Occupant> getBees()static intgetHoneyLevel(BlockState pState) intprivate booleanbooleanisEmpty()booleanbooleanisFull()booleanprotected voidloadAdditional(ValueInput p_422386_) voidregisterDebugValues(ServerLevel p_449663_, DebugValueSource.Registration p_449220_) releaseAllOccupants(BlockState pState, BeehiveBlockEntity.BeeReleaseStatus pReleaseStatus) private static booleanreleaseOccupant(Level pLevel, BlockPos pPos, BlockState pState, BeehiveBlockEntity.Occupant pOccupant, List<Entity> pStoredInHives, BeehiveBlockEntity.BeeReleaseStatus pReleaseStatus, BlockPos pStoredFlowerPos) voidremoveComponentsFromTag(ValueOutput p_422198_) protected voidsaveAdditional(ValueOutput p_422298_) static voidserverTick(Level pLevel, BlockPos pPos, BlockState pState, BeehiveBlockEntity pBeehive) voidvoidstoreBee(BeehiveBlockEntity.Occupant pOccupant) private static voidtickOccupants(Level pLevel, BlockPos pPos, BlockState pState, List<BeehiveBlockEntity.BeeData> pData, BlockPos pSavedFlowerPos) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, problemPath, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
TAG_FLOWER_POS
- See Also:
-
BEES
- See Also:
-
IGNORED_BEE_TAGS
-
MAX_OCCUPANTS
public static final int MAX_OCCUPANTS- See Also:
-
MIN_TICKS_BEFORE_REENTERING_HIVE
private static final int MIN_TICKS_BEFORE_REENTERING_HIVE- See Also:
-
MIN_OCCUPATION_TICKS_NECTAR
private static final int MIN_OCCUPATION_TICKS_NECTAR- See Also:
-
MIN_OCCUPATION_TICKS_NECTARLESS
public static final int MIN_OCCUPATION_TICKS_NECTARLESS- See Also:
-
stored
-
savedFlowerPos
-
-
Constructor Details
-
BeehiveBlockEntity
-
-
Method Details
-
setChanged
public void setChanged()- Overrides:
setChangedin classBlockEntity
-
isFireNearby
public boolean isFireNearby() -
isEmpty
public boolean isEmpty() -
isFull
public boolean isFull() -
emptyAllLivingFromHive
public void emptyAllLivingFromHive(@Nullable Player pPlayer, BlockState pState, BeehiveBlockEntity.BeeReleaseStatus pReleaseStatus) -
releaseAllOccupants
private List<Entity> releaseAllOccupants(BlockState pState, BeehiveBlockEntity.BeeReleaseStatus pReleaseStatus) -
getOccupantCount
public int getOccupantCount() -
getHoneyLevel
-
isSedated
public boolean isSedated() -
addOccupant
-
storeBee
-
releaseOccupant
private static boolean releaseOccupant(Level pLevel, BlockPos pPos, BlockState pState, BeehiveBlockEntity.Occupant pOccupant, @Nullable List<Entity> pStoredInHives, BeehiveBlockEntity.BeeReleaseStatus pReleaseStatus, @Nullable BlockPos pStoredFlowerPos) -
hasSavedFlowerPos
private boolean hasSavedFlowerPos() -
tickOccupants
private static void tickOccupants(Level pLevel, BlockPos pPos, BlockState pState, List<BeehiveBlockEntity.BeeData> pData, @Nullable BlockPos pSavedFlowerPos) -
serverTick
public static void serverTick(Level pLevel, BlockPos pPos, BlockState pState, BeehiveBlockEntity pBeehive) -
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-
applyImplicitComponents
- Overrides:
applyImplicitComponentsin classBlockEntity
-
collectImplicitComponents
- Overrides:
collectImplicitComponentsin classBlockEntity
-
removeComponentsFromTag
- Overrides:
removeComponentsFromTagin classBlockEntity
-
getBees
-
registerDebugValues
- Specified by:
registerDebugValuesin interfaceDebugValueSource- Overrides:
registerDebugValuesin classBlockEntity
-