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;
}
use of stanhebben.zenscript.annotations.ZenMethod in project TechReborn by TechReborn.
the class CTVacuumFreezer method addRecipe.
@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input, int ticktime, int euTick) {
Object oInput1 = CraftTweakerCompat.toObject(input);
VacuumFreezerRecipe r = new VacuumFreezerRecipe(oInput1, CraftTweakerCompat.toStack(output), ticktime, euTick);
addRecipe(r);
}
use of stanhebben.zenscript.annotations.ZenMethod in project TechReborn by TechReborn.
the class CTChemicalReactor method addRecipe.
@ZenMethod
public static void addRecipe(IItemStack output1, IIngredient input1, IIngredient input2, int ticktime, int euTick) {
Object oInput1 = CraftTweakerCompat.toObject(input1);
Object oInput2 = CraftTweakerCompat.toObject(input2);
ChemicalReactorRecipe r = new ChemicalReactorRecipe(oInput1, oInput2, CraftTweakerCompat.toStack(output1), ticktime, euTick);
addRecipe(r);
}
use of stanhebben.zenscript.annotations.ZenMethod in project TechReborn by TechReborn.
the class CTCompressor method addRecipe.
@ZenMethod
public static void addRecipe(IItemStack output1, IIngredient input1, int ticktime, int euTick) {
Object oInput1 = CraftTweakerCompat.toObject(input1);
CompressorRecipe r = new CompressorRecipe(oInput1, CraftTweakerCompat.toStack(output1), ticktime, euTick);
addRecipe(r);
}
Aggregations