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:
parent
8d9572af5c
commit
ccd9a73ece
|
@ -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());
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue