mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-28 07:55:58 +00:00
Commit 3
@Voidi did you forget the "int chances" in the new method by any chance or why weren't they there?
This commit is contained in:
1 parent
8d9572af5c
commit
ccd9a73ece
3 files changed
+13
-1
No files matched your search
@@ -51,6 +51,7 @@ public class Carpenter {
|
||||
MineTweakerAPI.apply(new Add(new Recipe(packagingTime, toFluid(fluidInput), toStack(box), ShapedRecipeCustom.createShapedRecipe(toStack(output), toShapedObjects(ingredients)) )));
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
@ZenMethod
|
||||
public static void addRecipe(int packagingTime, ILiquidStack liquid, IItemStack[] ingredients, IItemStack ingredient, IItemStack product) {
|
||||
ArrayList<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
|
||||
@@ -17,6 +17,7 @@ import modtweaker2.helpers.LogHelper;
|
||||
import modtweaker2.utils.BaseListAddition;
|
||||
import modtweaker2.utils.BaseListRemoval;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import stanhebben.zenscript.annotations.Optional;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import forestry.api.recipes.ICentrifugeRecipe;
|
||||
@@ -39,7 +40,7 @@ public class Centrifuge {
|
||||
* @param ingredient item input
|
||||
*/
|
||||
@ZenMethod
|
||||
public static void addRecipe(WeightedItemStack[] output, int timePerItem, IItemStack ingredient) {
|
||||
public static void addRecipe(WeightedItemStack[] output, int timePerItem, IItemStack ingredient, @Optional int[] chances) {
|
||||
Map<ItemStack, Float> products = new HashMap<ItemStack, Float>();
|
||||
for (WeightedItemStack product : output) {
|
||||
products.put(toStack(product.getStack()), product.getChance());
|
||||
|
||||
Reference in new issue
Block a user