NaturesAura/CraftTweakerCompat.md

69 lines
4.1 KiB
Markdown
Raw Normal View History

# Editing Nature's Aura recipes with CraftTweaker
2020-04-26 20:40:28 +02:00
Note that [CraftTweaker](https://minecraft.curseforge.com/projects/crafttweaker) is required for this compatibility.
***This documentation is for 1.15. For the 1.12 documentation, [click here](https://github.com/Ellpeck/NaturesAura/blob/1.12/CraftTweakerCompat.md).***
2019-03-31 10:25:20 +02:00
A few notes that apply for most of the recipe types:
- If you don't know how the CraftTweaker syntax works, [read up on it](https://docs.blamejared.com/en/#Getting_Started/) first.
- `name` is the name of a recipe. Read on for more information about this.
- `aura` is the amount of Aura required and represents the total amount required for the completion of the recipe (for reference, 1,000,000 is the default amount of Aura present in the world and 2,000,000 is the amount that is required for the Environmental Eye's bar to fill up fully)
- `time` is the time processes take in ticks
- For most removal recipes, `output` is the output of the recipe that should be removed. All recipes with the given outupt will be removed.
## On the Importance of Recipe Names
When replacing an existing recipe with a new one, the `name` variable of the recipe matters greatly, both for Nature's Aura's custom recipe types and for [vanilla crafting recipes](https://crafttweaker.readthedocs.io/en/latest/#Vanilla/Recipes/Crafting/Recipes_Crafting_Table/), if the replacement recipe should be displayed correctly in the Book of Natural Aura in place of the original recipe.
__The replacement recipe that is added for any given item inside of Nature's Aura needs to be named after the item id of the item that is being crafted.__
As an example, the following piece of code will remove the existing recipe of the Imperceptible Builder and replace it with a new one. Checking its Book of Natural Aura entry will then also display the new recipe correctly without errors.
```
2020-04-26 20:40:28 +02:00
recipes.remove(<item:naturesaura:placer>);
recipes.addShapeless("placer", <item:naturesaura:placer>, [<item:naturesaura:infused_iron>, <item:minecraft:piston>]);
```
Note that the name of the recipe is supplied as `placer` because the item id of the Imperceptible Builder is `naturesaura:placer`. Not doing this would lead to the Book of Natural Aura not displaying the new recipe.
_When adding a new recipe without replacing an existing one, the name of the newly added recipe does not matter._
## Natural Altar
2020-04-26 20:40:28 +02:00
```zs
mods.naturesaura.Altar.addRecipe(String name, IIngredient input, IItemStack output, String auraType, int aura, int time, IIngredient catalyst)
```
2020-04-26 20:40:28 +02:00
- `auraType` is the type of aura required for this recipe. For the regular Natural Altar, use `naturesaura:overworld`. For the nether variant of the altar, use `naturesaura:nether`.
- `catalyst` is the catalyst block that is placed on one of the four corner blocks, can be `null`
2020-04-26 20:40:28 +02:00
```zs
mods.naturesaura.Altar.removeRecipe(IItemStack output)
```
## Altar of Birthing
2020-04-26 20:40:28 +02:00
```zs
mods.naturesaura.AnimalSpawner.addRecipe(String name, String entity, int aura, int time, IIngredient[] ingredients)
```
- `entity` is the registry name of the entity that you want to spawn
2020-04-26 20:40:28 +02:00
```zs
mods.naturesaura.AnimalSpawner.removeRecipe(String name)
```
- `entity` is the registry name of the entity whose spawning recipe should be removed
## Offering to the Gods
2020-04-26 20:40:28 +02:00
```zs
mods.naturesaura.Offering.addRecipe(String name, IIngredient input, int inputAmount, IIngredient startItem, IItemStack output)
```
- `inputAmount` is the amount of items required for the input. Note that this means that the amount of the `input` variable is ignored
- `startItem` is the item required to start the offering, should pretty much always be `naturesaura:calling_spirit`
2020-04-26 20:40:28 +02:00
```zs
mods.naturesaura.Offering.removeRecipe(IItemStack output)
```
## Ritual of the Forest
2020-04-26 20:40:28 +02:00
```zs
mods.naturesaura.TreeRitual.addRecipe(String name, IIngredient saplingType, IItemStack result, int time, IIngredient[] items)
```
- `saplingType` is an item representation of the sapling that needs to be placed and grown into a tree
- `items` are the items that need to be placed on the wooden stands
2020-04-26 20:40:28 +02:00
```zs
mods.naturesaura.TreeRitual.removeRecipe(IItemStack output)
```