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
Copy
import crafttweaker.api.capability.IEnergyStorage;

Name: canExtract

Return Type: boolean

ZenScript
Copy
// IEnergyStorage.canExtract() as boolean

myIEnergyStorage.canExtract();

Name: canReceive

Return Type: boolean

ZenScript
Copy
// IEnergyStorage.canReceive() as boolean

myIEnergyStorage.canReceive();

Name: extractEnergy

Return Type: int

ZenScript
Copy
IEnergyStorage.extractEnergy(maxExtract as int, simulate as boolean) as int
参数类型描述
参数
maxExtract
类型
int
描述
No Description Provided
参数
simulate
类型
布尔值
描述
No Description Provided

Name: getEnergyStored

Return Type: int

ZenScript
Copy
// IEnergyStorage.getEnergyStored() as int

myIEnergyStorage.getEnergyStored();

Link to getMaxEnergyStored

Name: getMaxEnergyStored

Return Type: int

ZenScript
Copy
// IEnergyStorage.getMaxEnergyStored() as int

myIEnergyStorage.getMaxEnergyStored();

Name: receiveEnergy

Return Type: int

ZenScript
Copy
IEnergyStorage.receiveEnergy(maxReceive as int, simulate as boolean) as int
参数类型描述
参数
maxReceive
类型
int
描述
No Description Provided
参数
simulate
类型
布尔值
描述
No Description Provided
名称类型可获得可设置描述
名称
canExtract
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
canReceive
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
energyStored
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
maxEnergyStored
类型
int
可获得
true
可设置
false
描述
No Description Provided