Interface GlobalAttachments

All Superinterfaces:
AttachmentTarget

public interface GlobalAttachments extends 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).