Class AttachmentHolder.AsField

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField
All Implemented Interfaces:
IAttachmentHolder
Enclosing class:
AttachmentHolder

public static class AttachmentHolder.AsField extends 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.
  • Field Details

  • Constructor Details

  • Method Details

    • getExposedHolder

      IAttachmentHolder getExposedHolder()
      Description copied from class: AttachmentHolder
      Returns the attachment holder that is exposed to the user. This is the same as this for most cases, but when using AttachmentHolder.AsField it is the field holder.
      Overrides:
      getExposedHolder in class AttachmentHolder
    • deserializeInternal

      public void deserializeInternal(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag tag)