ItemCapability

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.neoforge.api.capability.ItemCapability;

Extends

ItemCapability<C, T> extends BaseCapability<C, T>.

Members

getCapability(entity as ItemStack, context as U) as T?
script.zs
// ItemCapability<C,T>.getCapability<T, U>(entity as ItemStack, context as U) as T?;
myItemCapability.getCapability<T, U>(myItemStack, myU);

Parameters:

entity Type: ItemStack
context Type: U

Return Type: T?

Getter
script.zs
// ItemCapability<C,T>.name as ResourceLocation
myItemCapability.name

Return Type: ResourceLocation