Somnium Infusing Recipe - KhanhPham05/AbyssTweaks GitHub Wiki

Somnium Infusing Recipe

This is the tutorial page for adding recipes for the Somnium Infuser

There are 4 ways that you can define how your recipe should look like.

Gui slots illustration :

Please note that the ingredients will be placed at 4 slots at the bottom (exclude the middle bottle slot which is the result slot) respectively from left to right, from 0 -> 3.

0. General Notes And Conditions

  • All int processTime parameters in the recipes are optional. It is 200 ticks by default and only higher than 20 ticks to prevent exploits.
  • All boolean mirror is optional. It is true by default.
  • The output of the recipes will always need Somnium Infuser and Loran Fuel. So you don't have to write it every single time.
  • After writing, you must save the script file and run /reload in game to apply recipe additions.

1. Single Ingredient Recipe

Syntax : somniumInfusing.addSingleIngredientRecipe(String recipeName, IItemStack result, IIngredient ingredient, int processTime)

The recipe doesn't have an option for recipe mirroring.

The ingredient slots will only have a single type of the ingredient that you pass in.

1.1 Example And Illustration

somniumInfusing.addSingleIngredientRecipe("test_somnium_single", <item:minecraft:diamond>, <item:minecraft:stone>);

The recipe will have the name "test_somnium_single", that create a diamond gem from 4 stone items.

2. Half-Half Recipe

Syntax : somniumInfusing.addHalfHalfRecipe(String recipeName, IItemStack result, IIngredient[] ingredients, int processTime, boolean mirror)

Condition : IIngredient[] ingredient array CAN ONLY HAVE 2 members.

Note : This recipe has an option for recipe mirroring

2.1 Example And Illustration

somniumInfusing.addHalfHalfRecipe("test_somnium_half", <item:minecraft:diamond>, [<item:minecraft:dirt>,<item:minecraft:stone>], 100, false);

The recipe will have the name : "test_somnium_half", that create a diamond gem from 2 dirt and 2 stone items (illustration below), also it will be crafted in 100 ticks (5 seconds).

3. Two Ingredients Recipe

Syntax : somniumInfusing.addTwoIngredientsRecipe(String recipeName, IItemStack result, IIngredient[] ingredients, boolean mirror);

Condition : IIngredient[] ingredients array CAN ONLY HAVE 2 members.

Note : This recipe has an option for recipe mirroring

3.1 Example And Illustration

somniumInfusing.addTwoIngredientsRecipe("test_somnium_two", <item:minecraft:diamond>, [<item:minecraft:dirt>, <item:minecraft:stone>], 160, false);

The recipe will have the name : "test_somnium_two", that create a diamond gem from 2 dirt and 2 stone items (illustration below), also it will be crafted in 160 ticks (8 seconds).

If recipe can be mirrored, the game will generate another recipe like this but ingredients swap places/orders.