use of stanhebben.zenscript.annotations.ZenMethod in project BetterWithAddons by DaedalusGame.
the class Condensed method setContainer.
@ZenMethod
public static void setContainer(@NotNull IItemStack condensed, @NotNull IItemStack input) {
ItemStack item = InputHelper.toStack(condensed);
ItemStack container = InputHelper.toStack(input);
if (item.getItem() instanceof ItemMaterial)
MineTweakerAPI.apply(new SetContainer((ItemMaterial) item.getItem(), container));
}
use of stanhebben.zenscript.annotations.ZenMethod in project BetterWithAddons by DaedalusGame.
the class SoakingBox method add.
@ZenMethod
public static void add(IItemStack output, IItemStack input) {
CherryBoxRecipe recipe = new CherryBoxRecipe(BlockCherryBox.CherryBoxType.SOAKING, InputHelper.toObject(input), InputHelper.toStack(output));
MineTweakerAPI.apply(new Add("SoakingBox", SoakingBoxRecipeCategory.UID, CraftingManagerSoakingBox.instance(), Lists.newArrayList(recipe)));
}
use of stanhebben.zenscript.annotations.ZenMethod in project BetterWithAddons by DaedalusGame.
the class Spindle method add.
@ZenMethod
public static void add(IItemStack[] outputs, @NotNull IIngredient input, boolean consumesSpindle) {
SpindleRecipe r = new SpindleRecipe(consumesSpindle, InputHelper.toObject(input), InputHelper.toStacks(outputs));
MineTweakerAPI.apply(new Add(r));
}
use of stanhebben.zenscript.annotations.ZenMethod in project BetterWithAddons by DaedalusGame.
the class Packing method add.
@ZenMethod
public static void add(IItemStack output, IIngredient input) {
ItemStack stack = CraftTweakerMC.getItemStack(output);
if (stack.getItem() instanceof ItemBlock) {
Block block = ((ItemBlock) stack.getItem()).getBlock();
PackingRecipe r = new PackingRecipe(new IngredientCraftTweaker(input), block.getStateFromMeta(stack.getMetadata()));
r.setJeiOutput(stack);
CraftTweaker.LATE_ACTIONS.add(new Add(r));
}
}
use of stanhebben.zenscript.annotations.ZenMethod in project Charset by CharsetMC.
the class MaterialRegistry method registerTypes.
@ZenMethod
public static boolean registerTypes(IItemStack stack, String... tags) {
ItemStack mcStack = CraftTweakerMC.getItemStack(stack);
if (mcStack.isEmpty()) {
return false;
}
CraftTweakerAPI.apply(new IAction() {
@Override
public void apply() {
ItemMaterial material = ItemMaterialRegistry.INSTANCE.getOrCreateMaterial(mcStack);
ItemMaterialRegistry.INSTANCE.registerTypes(material, tags);
}
@Override
public String describe() {
return "Registering stack " + stack + " as material with types " + JOINER.join(tags);
}
});
return true;
}
Aggregations