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
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
static enum
static final record
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
private static final org.slf4j.Logger
static final int
private static final int
static final int
private static final int
private BlockPos
private final List
<BeehiveBlockEntity.BeeData> private 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_) protected void
protected void
void
emptyAllLivingFromHive
(Player p_58749_, BlockState p_58750_, BeehiveBlockEntity.BeeReleaseStatus p_58751_) private List
<BeehiveBlockEntity.Occupant> getBees()
static int
getHoneyLevel
(BlockState p_58753_) int
private boolean
boolean
isEmpty()
boolean
boolean
isFull()
boolean
protected void
loadAdditional
(CompoundTag p_338675_, HolderLookup.Provider p_338666_) releaseAllOccupants
(BlockState p_58760_, BeehiveBlockEntity.BeeReleaseStatus p_58761_) private static boolean
releaseOccupant
(Level p_155137_, BlockPos p_155138_, BlockState p_155139_, BeehiveBlockEntity.Occupant p_332184_, List<Entity> p_155141_, BeehiveBlockEntity.BeeReleaseStatus p_155142_, BlockPos p_155143_) void
removeComponentsFromTag
(CompoundTag p_331127_) protected void
saveAdditional
(CompoundTag p_187467_, HolderLookup.Provider p_324426_) static void
serverTick
(Level p_155145_, BlockPos p_155146_, BlockState p_155147_, BeehiveBlockEntity p_155148_) void
void
storeBee
(BeehiveBlockEntity.Occupant p_330820_) 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, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setComponents, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, 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, getExistingData, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
LOGGER
private 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:
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_) -
getOccupantCount
public int getOccupantCount() -
getHoneyLevel
-
isSedated
public boolean isSedated() -
addOccupant
-
storeBee
-
releaseOccupant
private static boolean releaseOccupant(Level p_155137_, BlockPos p_155138_, BlockState p_155139_, BeehiveBlockEntity.Occupant p_332184_, @Nullable List<Entity> p_155141_, BeehiveBlockEntity.BeeReleaseStatus p_155142_, @Nullable BlockPos p_155143_) -
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_) -
loadAdditional
- Overrides:
loadAdditional
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
applyImplicitComponents
- Overrides:
applyImplicitComponents
in classBlockEntity
-
collectImplicitComponents
- Overrides:
collectImplicitComponents
in classBlockEntity
-
removeComponentsFromTag
- Overrides:
removeComponentsFromTag
in classBlockEntity
-
getBees
-