EntityCapability
Link to entitycapability
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.EntityCapability;
Extending BaseCapability<T,C>
Link to extending-basecapabilitytc
EntityCapability extends BaseCapability<T,C>. That means all methods available in BaseCapability<T,C> are also available in EntityCapability
Methods
Link to methods
Name: getCapability
Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T
ZenScript CopyEntityCapability.getCapability<T : Object, U : Object>(entity as Entity, context as U) as @org.openzen.zencode.java.ZenCodeType.Nullable T
Parameter | Type |
---|---|
Parameter entity | Type Entity |
Parameter context | Type U |
Parameter T | Type Object |
Parameter U | Type Object |