IAttachmentHolder

Link to iattachmentholder

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.IAttachmentHolder;

Link to getAttachmentData

Name: getAttachmentData

Return Type: T

ZenScript
Copy
IAttachmentHolder.getAttachmentData<T : Object>(type as AttachmentType<T>) as T
ParameterType
Parameter
type
Type
AttachmentType<T>
Parameter
T
Type
Object

Link to getAttachmentData

Name: getAttachmentData

Return Type: T

ZenScript
Copy
IAttachmentHolder.getAttachmentData<T : Object>(type as Supplier<AttachmentType<T>>) as T
ParameterType
Parameter
type
Type
Supplier<AttachmentType<T>>
Parameter
T
Type
Object

Link to hasAttachmentData

Name: hasAttachmentData

Return Type: boolean

ZenScript
Copy
IAttachmentHolder.hasAttachmentData<T : Object>(type as AttachmentType<T>) as boolean
ParameterType
Parameter
type
Type
AttachmentType<T>
Parameter
T
Type
Object

Link to hasAttachmentData

Name: hasAttachmentData

Return Type: boolean

ZenScript
Copy
IAttachmentHolder.hasAttachmentData<T : Object>(type as Supplier<AttachmentType<T>>) as boolean
ParameterType
Parameter
type
Type
Supplier<AttachmentType<T>>
Parameter
T
Type
Object

Link to setAttachmentData

Name: setAttachmentData

Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T

ZenScript
Copy
IAttachmentHolder.setAttachmentData<T : Object>(type as AttachmentType<T>, data as T) as @org.openzen.zencode.java.ZenCodeType.Nullable T
ParameterType
Parameter
type
Type
AttachmentType<T>
Parameter
data
Type
T
Parameter
T
Type
Object

Link to setAttachmentData

Name: setAttachmentData

Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T

ZenScript
Copy
IAttachmentHolder.setAttachmentData<T : Object>(type as Supplier<AttachmentType<T>>, data as T) as @org.openzen.zencode.java.ZenCodeType.Nullable T
ParameterType
Parameter
type
Type
Supplier<AttachmentType<T>>
Parameter
data
Type
T
Parameter
T
Type
Object