Metal
Link to metal
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 mods.tfc.api.Metal;
Static Methods
Link to static-methods
Name: getAllMetals
Get all the registered metals
Returns: an array containing all registered metals
Return Type: Metal[]
ZenScript Copy// Metal.getAllMetals() as Metal[]
Metal.getAllMetals();
Name: getMetalFromIngot
get the metal from ingot
Returns: metal found
Return Type: Metal
ZenScript Copy// Metal.getMetalFromIngot(stack as IItemStack) as Metal
Metal.getMetalFromIngot(<item:tfc:metal/ingot/copper>);
Parameter | Type | Description |
---|---|---|
Parameter stack | Type IItemStack | Description ingot |
Methods
Link to methods
Name: getCommandString
Return Type: string
ZenScript Copy// Metal.getCommandString() as string
myMetal.getCommandString();
Name: getFluidStack
get a fluidstack from a metal
Returns:
Return Type: IFluidStack
ZenScript Copy// Metal.getFluidStack(amount as int) as IFluidStack
<metal:tfc:copper>.getFluidStack(100);
Parameter | Type | Description |
---|---|---|
Parameter amount | Type int | Description amount |
Name: getMetalPart
return the item corresponding to that metal part
Returns:
Return Type: IItemStack
ZenScript Copy// Metal.getMetalPart(partName as string) as IItemStack
<tfc:metal:copper>.getMetalPart("ingot");
Parameter | Type | Description |
---|---|---|
Parameter partName | Type string | Description metal part name |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name commandString | Type string | Has Getter true | Has Setter false |