RunicEnergyCost
Link to runicenergycost
导入类
Link to 导入类
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 mods.solarforge.RunicEnergyCost;
Static Methods
Link to static-methods
Name: EMPTY
Returns: An empty RunicEnergyCost with no requirements.
Return Type: RunicEnergyCost
ZenScript Copy// RunicEnergyCost.EMPTY() as RunicEnergyCost
RunicEnergyCost.EMPTY();
使用方式
Link to 使用方式
Name: getType
Returns: A copy of the internal RunicEnergyTypes and the necessary amount needed for each one.
Return Type: float?[RunicEnergyType]
ZenScript Copy// RunicEnergyCost.getType() as float?[RunicEnergyType]
myRunicEnergyCost.getType();
Name: setTypeOfMap
Sets a certain RunicEnergyType to the passed in amount.
Ideally, it should be used in chain, just like a builder, to manage the final object you want.
ZenScript Copyimport mods.solarforge.RunicEnergyCost;
var customEnergyCost = RunicEnergyCost.EMPTY()
.setTypeOfMap(<constant:solarforge:energytype:ultima>, 20)
.setTypeOfMap(<constant:solarforge:energytype:urba>, 5)
.setTypeOfMap(<constant:solarforge:energytype:zeta>, 30);
customEnergyCost
is now usable as a variable in an InfuserManager
Returns: The modified RunicEnergyCost.
Return Type: RunicEnergyCost
ZenScript Copy// RunicEnergyCost.setTypeOfMap(type as RunicEnergyType, amount as int) as RunicEnergyCost
myRunicEnergyCost.setTypeOfMap(<constant:solarforge:energytype:ultima>, 10);
参数 | 类型 | 描述 |
---|---|---|
参数 类型 | 类型 RunicEnergyType | 描述 The type to set |
参数 amount | 类型 int | 描述 The amount to set the type to |
名称 | 类型 | 可获得 | 可设置 | 描述 |
---|---|---|---|---|
名称 types | 类型 float?[RunicEnergyType] | 可获得 true | 可设置 false | 描述 |