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:
IAttachmentHolder
,IBlockEntityExtension
,INBTSerializable<CompoundTag>
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
static enum
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final int
static final String
private static final int
static final int
private static final int
private BlockPos
private final List<BeehiveBlockEntity.BeeData>
static final String
static final String
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOccupant
(Entity p_58742_, boolean p_58743_) void
addOccupantWithPresetTicks
(Entity p_58745_, boolean p_58746_, int p_58747_) void
emptyAllLivingFromHive
(Player p_58749_, BlockState p_58750_, BeehiveBlockEntity.BeeReleaseStatus p_58751_) static int
getHoneyLevel
(BlockState p_58753_) int
private boolean
boolean
isEmpty()
boolean
boolean
isFull()
boolean
void
load
(CompoundTag p_155156_) releaseAllOccupants
(BlockState p_58760_, BeehiveBlockEntity.BeeReleaseStatus p_58761_) private static boolean
releaseOccupant
(Level p_155137_, BlockPos p_155138_, BlockState p_155139_, BeehiveBlockEntity.BeeData p_155140_, List<Entity> p_155141_, BeehiveBlockEntity.BeeReleaseStatus p_155142_, BlockPos p_155143_) (package private) static void
removeIgnoredBeeTags
(CompoundTag p_155162_) protected void
saveAdditional
(CompoundTag p_187467_) static void
serverTick
(Level p_155145_, BlockPos p_155146_, BlockState p_155147_, BeehiveBlockEntity p_155148_) private static void
setBeeReleaseData
(int p_58737_, Bee p_58738_) void
void
storeBee
(CompoundTag p_155158_, int p_155159_, boolean p_155160_) private static void
tickOccupants
(Level p_155150_, BlockPos p_155151_, BlockState p_155152_, List<BeehiveBlockEntity.BeeData> p_155153_, BlockPos p_155154_) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, removeData, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
areAttachmentsCompatible, deserializeAttachments, getData, hasAttachments, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
deserializeNBT, getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Field Details
-
TAG_FLOWER_POS
- See Also:
-
MIN_OCCUPATION_TICKS
- See Also:
-
ENTITY_DATA
- See Also:
-
TICKS_IN_HIVE
- See Also:
-
HAS_NECTAR
- 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:
setChanged
in classBlockEntity
-
isFireNearby
public boolean isFireNearby() -
isEmpty
public boolean isEmpty() -
isFull
public boolean isFull() -
emptyAllLivingFromHive
public void emptyAllLivingFromHive(@Nullable Player p_58749_, BlockState p_58750_, BeehiveBlockEntity.BeeReleaseStatus p_58751_) -
releaseAllOccupants
private List<Entity> releaseAllOccupants(BlockState p_58760_, BeehiveBlockEntity.BeeReleaseStatus p_58761_) -
addOccupant
-
getOccupantCount
public int getOccupantCount() -
getHoneyLevel
-
isSedated
public boolean isSedated() -
addOccupantWithPresetTicks
-
storeBee
-
releaseOccupant
private static boolean releaseOccupant(Level p_155137_, BlockPos p_155138_, BlockState p_155139_, BeehiveBlockEntity.BeeData p_155140_, @Nullable List<Entity> p_155141_, BeehiveBlockEntity.BeeReleaseStatus p_155142_, @Nullable BlockPos p_155143_) -
removeIgnoredBeeTags
-
setBeeReleaseData
-
hasSavedFlowerPos
private boolean hasSavedFlowerPos() -
tickOccupants
private static void tickOccupants(Level p_155150_, BlockPos p_155151_, BlockState p_155152_, List<BeehiveBlockEntity.BeeData> p_155153_, @Nullable BlockPos p_155154_) -
serverTick
public static void serverTick(Level p_155145_, BlockPos p_155146_, BlockState p_155147_, BeehiveBlockEntity p_155148_) -
load
- Overrides:
load
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
writeBees
-