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