EntityCapability

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

Extends

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

Members

getCapability(entity as Entity, context as U) as T?
script.zs
// EntityCapability<C,T>.getCapability<T, U>(entity as Entity, context as U) as T?;
myEntityCapability.getCapability<T, U>(myEntity, myU);

Parameters:

entity Type: Entity
context Type: U

Return Type: T?

Getter
script.zs
// EntityCapability<C,T>.name as ResourceLocation
myEntityCapability.name

Return Type: ResourceLocation