Class AttachmentHolder.AsField
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField
- All Implemented Interfaces:
IAttachmentHolder
- Enclosing class:
AttachmentHolder
Version of the
AttachmentHolder that is suitable for storing in a field.
To be used when extending AttachmentHolder is not possible,
for example because the class already has a supertype.-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
Field Summary
FieldsFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
attachments, ATTACHMENTS_NBT_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserializeInternal(HolderLookup.Provider provider, CompoundTag tag) (package private) IAttachmentHolderReturns the attachment holder that is exposed to the user.Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getAttachmentMap, getData, getExistingData, hasAttachments, hasData, removeData, serializeAttachments, setDataMethods 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, hasData, removeData, setData
-
Field Details
-
exposedHolder
-
-
Constructor Details
-
AsField
-
-
Method Details
-
getExposedHolder
IAttachmentHolder getExposedHolder()Description copied from class:AttachmentHolderReturns the attachment holder that is exposed to the user. This is the same asthisfor most cases, but when usingAttachmentHolder.AsFieldit is the field holder.- Overrides:
getExposedHolderin classAttachmentHolder
-
deserializeInternal
-