Distillation
Link to distillation
addRecipe
Link to addrecipe
Die Distillation "addRecipe" Methode besteht aus:
Type | Datentyp |
---|---|
Type Output | Datentyp Fluidstack Array[] |
Type Output | Datentyp ItemStack Array[] |
Type Input | Datentyp Fluidstack |
Type Energy | Datentyp Integer |
Type Time in Ticks | Datentyp Integer |
Type Chance | Datentyp Float Array [] |
Preface:
Link to preface
Jeder ItemStack Eintrag ist mit dem entsprechenden Array-Eintrag "Chance" verknüpft.
Beispiel:
ZenScript Copy[<minecraft:diamond>, <minecraft:leather> * 2]
[1, 1]
Der Float Wert des Typs Chance sollte zwischen 0 und 1 liegen. Da es sich von einen Float-Wert in einen Prozent Wert umrechnet.
ZenScript Copy0.5 = 50%
0.22374 = 22.374%
1 = 100%
Während du den Float wert über 1 setzen kannst, wird er niemals einen Wert über 100% erreichen
Beispielcode:
Link to beispielcode
ZenScript Copy//mods.immersivepetroleum.Distillation.addRecipe(ILiquidStack[] fluidOutputs, IItemStack[] itemOutputs, ILiquidStack fluidInput, int energy, int time, float[] chance)
mods.immersivepetroleum.Distillation.addRecipe([<liquid:lava> * 5, <liquid:gasoline> * 5], [<minecraft:diamond>, <minecraft:leather> * 2], <liquid:water>, 5, 5, [1, 1]);