use of stanhebben.zenscript.annotations.ZenMethod in project HorsePower by GoryMoon.
the class PressRecipeTweaker method remove.
@ZenMethod
public static void remove(IIngredient output) {
List<PressRecipe> toRemove = Lists.newArrayList();
List<Integer> removeIndex = Lists.newArrayList();
for (int i = 0; i < HPRecipes.instance().getGrindstoneRecipes().size(); i++) {
PressRecipe recipe = HPRecipes.instance().getPressRecipes().get(i);
if (OreDictionary.itemMatches(MineTweakerMC.getItemStack(output), recipe.getOutput(), false)) {
toRemove.add(recipe);
removeIndex.add(i);
}
}
RemovePressRecipe recipe = new RemovePressRecipe(toRemove, removeIndex);
MineTweakerAPI.apply(recipe);
TweakerPluginImpl.actions.add(recipe);
}
use of stanhebben.zenscript.annotations.ZenMethod in project HorsePower by GoryMoon.
the class GrindstoneRecipeTweaker method add.
@ZenMethod
public static void add(IIngredient input, IItemStack output, int time, @Optional boolean hand, @Optional IItemStack secondary, @Optional int secondaryChance) {
List<IItemStack> items = input.getItems();
if (items == null) {
HorsePowerMod.logger.error("Cannot turn " + input.toString() + " into a grinding recipe");
}
ItemStack[] items2 = getItemStacks(items);
ItemStack output2 = getItemStack(output);
ItemStack secondary2 = getItemStack(secondary);
AddGrindstoneRecipe recipe = new AddGrindstoneRecipe(input, items2, output2, secondary2, secondaryChance, time, hand);
MineTweakerAPI.apply(recipe);
TweakerPluginImpl.actions.add(recipe);
}
use of stanhebben.zenscript.annotations.ZenMethod in project Minestuck by mraof.
the class Alchemy method removeCost.
@ZenMethod
public static void removeCost(IItemStack iStack) {
ItemStack stack = (ItemStack) iStack.getInternal();
MineTweakerAPI.apply(new SetCost(stack.getItem(), stack.getItemDamage(), null));
}
use of stanhebben.zenscript.annotations.ZenMethod in project Minestuck by mraof.
the class Combinations method addOreDictRecipe.
@ZenMethod
public static void addOreDictRecipe(IItemStack input1, String input2, String mode, IItemStack output) {
ItemStack stack = (ItemStack) input1.getInternal();
MineTweakerAPI.apply(new SetRecipe(stack.getItem(), stack.getItemDamage(), input2, OreDictionary.WILDCARD_VALUE, getMode(mode), (ItemStack) output.getInternal()));
}
use of stanhebben.zenscript.annotations.ZenMethod in project Minestuck by mraof.
the class Combinations method removeRecipe.
@ZenMethod
public static void removeRecipe(IItemStack input1, IItemStack input2, String mode) {
ItemStack stack1 = (ItemStack) input1.getInternal();
ItemStack stack2 = (ItemStack) input2.getInternal();
MineTweakerAPI.apply(new SetRecipe(stack1.getItem(), stack1.getItemDamage(), stack2.getItem(), stack2.getItemDamage(), getMode(mode), null));
}
Aggregations