Class AttachmentRegistry

java.lang.Object
net.ixdarklord.coolcatcore.api.attachment.AttachmentRegistry

public final class AttachmentRegistry extends Object
One mod's Attachments. A mod's values are stored under its own id: in the <modid>:attachments item component on stacks, and in a <modid>:attachments tag in entity and block entity data, so each mod's data stays separate from every other's.

 public static final AttachmentRegistry ATTACHMENTS = AttachmentRegistry.create(MOD_ID);
 public static final Attachment<Integer> MADNESS = ATTACHMENTS.builder("madness", Codec.INT, 0).build();

 // While the mod initialises (it registers the item component, like a DeferredRegister):
 ATTACHMENTS.register();