Class CustomItemDisplayContextTest.ItemHangerBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.neoforged.neoforge.oldtest.client.model.CustomItemDisplayContextTest.ItemHangerBlockEntity
- All Implemented Interfaces:
IAttachmentHolder
,IBlockEntityExtension
- Enclosing class:
CustomItemDisplayContextTest
-
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
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
ConstructorDescriptionItemHangerBlockEntity
(BlockPos blockPos, BlockState blockState) ItemHangerBlockEntity
(BlockEntityType<?> type, BlockPos blockPos, BlockState blockState) -
Method Summary
Modifier and TypeMethodDescription@Nullable Packet
<ClientGamePacketListener> getUpdateTag
(HolderLookup.Provider holderLookup) void
loadAdditional
(CompoundTag tag, HolderLookup.Provider holderLookup) void
onDataPacket
(Connection net, ClientboundBlockEntityDataPacket pkt, HolderLookup.Provider lookupProvider) Called when you receive a TileEntityData packet for the location this TileEntity is currently in.protected void
saveAdditional
(CompoundTag tag, HolderLookup.Provider holderLookup) 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, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, 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
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onLoad, requestModelDataUpdate
-
Field Details
-
heldItem
-
-
Constructor Details
-
ItemHangerBlockEntity
-
ItemHangerBlockEntity
-
-
Method Details
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
onDataPacket
public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt, HolderLookup.Provider lookupProvider) 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
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
loadAdditional
- Overrides:
loadAdditional
in classBlockEntity
-