use of stanhebben.zenscript.annotations.ZenMethod in project Minestuck by mraof.
the class Combinations method addRecipe.
@ZenMethod
public static void addRecipe(IItemStack input1, IItemStack input2, String mode, IItemStack output) {
ItemStack stack1 = (ItemStack) input1.getInternal();
ItemStack stack2 = (ItemStack) input2.getInternal();
recipes.add(new SetRecipe(stack1.getItem(), stack1.getItemDamage(), stack2.getItem(), stack2.getItemDamage(), getMode(mode), (ItemStack) output.getInternal()));
}
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();
recipes.add(new SetRecipe(stack.getItem(), stack.getItemDamage(), input2, OreDictionary.WILDCARD_VALUE, getMode(mode), (ItemStack) output.getInternal()));
}
use of stanhebben.zenscript.annotations.ZenMethod in project HorsePower by GoryMoon.
the class ChoppingRecipeTweaker method add.
@ZenMethod
public static void add(IIngredient input, IItemStack output, int time, @Optional boolean hand) {
List<IItemStack> items = input.getItems();
if (items == null) {
HorsePowerMod.logger.error("Cannot turn " + input.toString() + " into a chopping recipe");
}
ItemStack[] items2 = getItemStacks(items);
ItemStack output2 = getItemStack(output);
AddChoppingRecipe recipe = new AddChoppingRecipe(input, items2, output2, ItemStack.EMPTY, 0, time, hand);
MineTweakerAPI.apply(recipe);
TweakerPluginImpl.actions.add(recipe);
}
use of stanhebben.zenscript.annotations.ZenMethod in project HorsePower by GoryMoon.
the class ChoppingRecipeTweaker method remove.
@ZenMethod
public static void remove(IIngredient output, @Optional boolean hand) {
List<ChoppingBlockRecipe> toRemove = Lists.newArrayList();
List<Integer> removeIndex = Lists.newArrayList();
for (int i = 0; i < HPRecipes.instance().getGrindstoneRecipes().size(); i++) {
ChoppingBlockRecipe recipe = HPRecipes.instance().getChoppingRecipes().get(i);
if (OreDictionary.itemMatches(MineTweakerMC.getItemStack(output), recipe.getOutput(), false)) {
toRemove.add(recipe);
removeIndex.add(i);
}
}
RemoveChoppingRecipe recipe = new RemoveChoppingRecipe(toRemove, removeIndex, hand);
MineTweakerAPI.apply(recipe);
TweakerPluginImpl.actions.add(recipe);
}
use of stanhebben.zenscript.annotations.ZenMethod in project HorsePower by GoryMoon.
the class PressRecipeTweaker method add.
@ZenMethod
public static void add(IIngredient input, IItemStack output) {
List<IItemStack> items = input.getItems();
if (items == null) {
HorsePowerMod.logger.error("Cannot turn " + input.toString() + " into a press recipe");
}
ItemStack[] items2 = getItemStacks(items);
ItemStack output2 = getItemStack(output);
AddPressRecipe recipe = new AddPressRecipe(input, items2, output2, ItemStack.EMPTY, 0, 0);
MineTweakerAPI.apply(recipe);
TweakerPluginImpl.actions.add(recipe);
}
Aggregations