NeoForgeIItemStackExpansions
Expands
This class expands
IItemStack
, meaning that the content found on this page can be called on that type directly.
Members
canPerformAction(action as ItemAbility) as bool
Checks if this item can perform the given script.zs
ItemAbility
.Returns: True if it can perform the action, false otherwise.
myIItemStack.canPerformAction(myItemAbility);
Parameters:
Return Type:
bool
getCapability(cap as ItemCapability<Void, T>) as T?
myIItemStack.getCapability<T>(myItemCapability);
Parameters:
cap: ItemCapability<Void, T>
Type: ItemCapability<Void, T>
Return Type:
T?
getCapabilityWithContext(cap as ItemCapability<C, T>, context as C?) as T?
myIItemStack.getCapabilityWithContext<C, T>(myItemCapability, myC);
Parameters:
cap: ItemCapability<C, T>
Type: ItemCapability<C, T>
context: C?
Type: C?
Return Type:
T?