@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:
Yulife 2015-09-26 11:11:22 +02:00
parent 8d9572af5c
commit ccd9a73ece
3 changed files with 13 additions and 1 deletions

View file

@ -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>();

View file

@ -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());

View file

@ -24,11 +24,21 @@ public class ToolStats {
MineTweakerAPI.apply(new SetToolStats(material, "", new ToolMaterial(material, name, level, durability, speed, damage, (float) handle, reinforced, (float) stonebound, style, 0xFFFFFF)));
}
/**
* @deprecated
*/
@java.lang.Deprecated
@ZenMethod
public static void set(String material, @Optional String name, int level, int durability, int speed, int damage, double handle, int reinforced, double stonebound, String style, int primaryColor) {
if (name == null) name = material + " ";
MineTweakerAPI.apply(new SetToolStats(material, "", new ToolMaterial(material, name, level, durability, speed, damage, (float) handle, reinforced, (float) stonebound, style, primaryColor)));
}
@ZenMethod
public static void setStats(String material, @Optional String name, int level, int durability, int speed, int damage, double handle, int reinforced, double stonebound, String style, int primaryColor) {
if (name == null) name = material + " ";
MineTweakerAPI.apply(new SetToolStats(material, "", new ToolMaterial(material, name, level, durability, speed, damage, (float) handle, reinforced, (float) stonebound, style, primaryColor)));
}
@ZenMethod
public static void setDisplayName(String material, String name) {