Mineral Mix
Link to mineral-mix
Dieses Paket importieren
Link to dieses-paket-importieren
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 import mods.immersiveengineering.MineralMix;
.
Fail Chance
Link to fail-chance
You can get and set the failchance for the Mineralmix using the failChance [ZenSetter/Getter] on the object.
Get Mineral
Link to get-mineral
Required | Type | Datentyp |
---|---|---|
Required Required | Type Name | Datentyp string |
ZenScript Copy//Example:
Excavator.getMineral(String Name);
var Iron = Excavator.getMineral("Iron_Ore");
Add Ore
Link to add-ore
Required | Type | Datentyp |
---|---|---|
Required Required | Type Ore | Datentyp string |
Required Required | Type Chance | Datentyp string |
ZenScript CopymineralMixObject.addOre("oreIron", 0.5);
You will need to use the oredict names.
Remove Ore
Link to remove-ore
Required | Type | Datentyp |
---|---|---|
Required Required | Type Ore | Datentyp string |
ZenScript CopymineralMixObject.removeOre("oreIron");
Fail Chance Getter/Setter
Link to fail-chance-gettersetter
Beispiel
Link to beispiel
ZenScript Copy//Getter
mineralMixObject.failchance;
//Setter
mineralMixObject.failchance = 0.5;
Full Example
Link to full-example
ZenScript Copy//Example:
import mods.immersiveengineering.Excavator;
import mods.immersiveengineering.MineralMix;
//Get The Mineral Mix
mods.immersiveengineering.Excavator.addMineral("Iron_Ore", 50, 0.005, ["oreIron", "oreDiamond"], [0.005, 0.01], [1, 0, -1]);
var Iron = Excavator.getMineral("Iron_Ore");
Iron.addOre("oreIron", 0.5);
//Print Initial Fail Chance
print(Iron.failChance);
//Set The Fail Chance to 25%
Iron.failChance = 0.25;
//Print Out The Fail Chance
print(Iron.failChance);
//Set The Fail Chance to 50%
Iron.failChance = 0.5;
//Print Final Fail Chance
print(Iron.failChance);