ItemCapability
Link to itemcapability
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 Copyimport crafttweaker.neoforge.api.capability.ItemCapability;
Extending BaseCapability<T,C>
Link to extending-basecapabilitytc
ItemCapability extends BaseCapability<T,C>. That means all methods available in BaseCapability<T,C> are also available in ItemCapability
Methods
Link to methods
Name: getCapability
Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T
ZenScript CopyItemCapability.getCapability<T : Object, U : Object>(entity as ItemStack, context as U) as @org.openzen.zencode.java.ZenCodeType.Nullable T
Parameter | Type |
---|---|
Parameter entity | Type ItemStack |
Parameter context | Type U |
Parameter T | Type Object |
Parameter U | Type Object |