Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.neoforge.api.attachment.AttachmentType;
Result TypeIs Implicit
Result Type
string
Is Implicit
false

Link to getCommandString

Name: getCommandString

Gets the attachment_type bracket handler syntax for this AttachmentType.

E.G. <attachment_type:minecraft:mana>

Returns: The attachment_type bracket handler syntax for this AttachmentType.
Return Type: string

ZenScript
Copy
// AttachmentType.getCommandString() as string

myAttachmentType.getCommandString();

Name: getRegistryName

Gets the registry name of this AttachmentType.

Returns: A ResourceLocation of the registry name of this AttachmentType.
Return Type: ResourceLocation

ZenScript
Copy
// AttachmentType.getRegistryName() as ResourceLocation

myAttachmentType.getRegistryName();
NameTypeHas GetterHas SetterDescription
Name
commandString
Type
string
Has Getter
true
Has Setter
false
Description
Gets the attachment_type bracket handler syntax for this AttachmentType.

E.G.
<attachment_type:minecraft:mana>
Name
registryName
Type
ResourceLocation
Has Getter
true
Has Setter
false
Description
Gets the registry name of this AttachmentType.