Rustic

Rustic

45M Downloads

[Wiki] CraftTweaker alchemy support improvements

Riernar opened this issue ยท 0 comments

commented

Following #288 , the support for crafttweaker has changed.
Some clarification can be useful to packmakers, so I added them here.

Alchemy Recipes

[skipped elixir format]
Alchemy recipes are divided in simple recipe and advanced recipe. A simple recipe can be performed in the standard condenser, while an advanced recipe requires the advanced condenser.

In all the following methods, a recipe is simple if it has two ingredients or less and no modifier.

If you wish to force a 2-ingredient modifier-less recipe to require the advanced condenser, you can add a first ingredients as null to have a 3-ingredients recipe, where one ingredient is ignored.

To add simple alchemy recipes (2 ingredients or fewer, no modifier), you can use the simple method:

mods.rustic.Condenser.addRecipe(IItemStack output, IIngredient input1, IIngredient input2);

where:

  • output is the output of the recipe
  • input1 is the first input
  • input2 is the second input

Recipes added that way automatically fulfill the simple recipe criteria, though you have less control.

Before version 1.1.3, the inputs must be IItemStack
In version 1.1.3, full IIngredient support was added

For more control over the modifier, bottle, the cooking time and the fluid required, the full method is:

This method is only available on version 1.1.3+

 mods.rustic.Condenser.addRecipe(IItemStack output, IIngredients[] inputs, @optional IIngredient modifier, @option IIngredient bottle,@optional ILiquidStack fluid, @optional int time);

where

  • output is the recipe output
  • inputs is an array of at most 3 inputs
  • modifier is the modifier required, can be null or left-out (in which case it's null)
  • bottle is the bottle required in the bottle slot. If nullor left-out, it defaults to a vanilla glass bottle. (WARNING: do not use items that can be used as fuel in a furnace as bottles, otherwise the recipe cannot be automated. See the Alchemy page for details)
  • fluid is the fluid and amount to consume. If nullor left out, it defaults to 125mb of water (that is, <liquid:water> * 125 in CrT syntax)
  • time is the time in ticks that the recipe takes to complete, defaults to 400 if left out.

All optional parameter can be left out, but cannot be skipped. You can use null to leave an optional parameter (but not time) to its default.

In short, you can use the method like so:

mods.rustic.Condenser.addRecipe(output, itemstack[] inputs);
mods.rustic.Condenser.addRecipe(output, itemstack[] inputs, modifier);
mods.rustic.Condenser.addRecipe(output, itemstack[] inputs, modifier, bottle);
mods.rustic.Condenser.addRecipe(output, itemstack[] inputs, modifier, bottle, fluid);
mods.rustic.Condenser.addRecipe(output, itemstack[] inputs, modifier, bottle, fluid, time);

To remove recipes, use

mods.rustic.Condenser.removeRecipe(IItemStack output);

where output is the output for which to remove recipes.