Class FullPotsAccessorDemo.DioriteFlowerPotBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.neoforged.neoforge.oldtest.block.FullPotsAccessorDemo.DioriteFlowerPotBlockEntity
- All Implemented Interfaces:
IAttachmentHolder
,IBlockEntityExtension
- Enclosing class:
FullPotsAccessorDemo
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ModelData
private Block
static final ModelProperty
<Block> 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAllows you to return additional model data.getPlant()
getUpdateTag
(HolderLookup.Provider holderLookup) void
handleUpdateTag
(CompoundTag tag, HolderLookup.Provider holderLookup) Called when the chunk's TE update tag, gotten fromBlockEntity.getUpdateTag(HolderLookup.Provider)
, is received on the client.void
loadAdditional
(CompoundTag tag, HolderLookup.Provider holderLookup) void
onDataPacket
(Connection net, ClientboundBlockEntityDataPacket pkt, HolderLookup.Provider holderLookup) Called when you receive a TileEntityData packet for the location this TileEntity is currently in.protected void
saveAdditional
(CompoundTag tag, HolderLookup.Provider holderLookup) void
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, 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
invalidateCapabilities, onChunkUnloaded, onLoad, requestModelDataUpdate
-
Field Details
-
PLANT_PROPERTY
-
modelData
-
plant
-
-
Constructor Details
-
DioriteFlowerPotBlockEntity
-
-
Method Details
-
setPlant
-
getPlant
-
getModelData
Description copied from interface:IBlockEntityExtension
Allows you to return additional model data. This data can be used to provide additional functionality in yourBakedModel
. You need to schedule a refresh of you model data viaIBlockEntityExtension.requestModelDataUpdate()
if the result of this function changes.This method is always called on the main client thread.
- Returns:
- Your model data
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
handleUpdateTag
Description copied from interface:IBlockEntityExtension
Called when the chunk's TE update tag, gotten fromBlockEntity.getUpdateTag(HolderLookup.Provider)
, is received on the client.Used to handle this tag in a special way. By default this simply calls
BlockEntity.loadWithComponents(CompoundTag, HolderLookup.Provider)
.- Parameters:
tag
- TheCompoundTag
sent fromBlockEntity.getUpdateTag(HolderLookup.Provider)
-
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
onDataPacket
public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt, HolderLookup.Provider holderLookup) Description copied from interface:IBlockEntityExtension
Called when you receive a TileEntityData packet for the location this TileEntity is currently in. On the client, the NetworkManager will always be the remote server. On the server, it will be whomever is responsible for sending the packet.- Parameters:
net
- The NetworkManager the packet originated frompkt
- The data packet
-
loadAdditional
- Overrides:
loadAdditional
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-