Interface GlobalAttachments
- All Superinterfaces:
AttachmentTarget
An
AttachmentTarget representing global (server-wide) data attachments that are not tied
to any specific Level.
This target can be obtained via GlobalAttachmentsProvider.globalAttachments(), which returns the appropriate instance
on either side. Additionally, GlobalAttachmentsProvider.globalAttachments() can be used on the server-side
for convenience.
On the server, the lifecycle of this target is bound to the lifecycle of the MinecraftServer
while on the client it is bound to ClientPacketListener and should only be accessed when in a world
(when Minecraft.getInstance().level is not null).
-
Nested Class Summary
Nested classes/interfaces inherited from interface AttachmentTarget
AttachmentTarget.OnAttachedSet<A> -
Field Summary
Fields inherited from interface AttachmentTarget
NBT_ATTACHMENT_KEY -
Method Summary
Methods inherited from interface AttachmentTarget
getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, onAttachedSet, removeAttached, setAttached