PlantTech 2 Configurations

Crops and most of the machine recipes are configurable through datapacks in the latest version (1.16+).

The format of the recipes is changed in the latest (PlantTech 2 - 0.02.66 - 1.20.1) update, make sure you don't messed up with legacy versions when making your own datapack.

In much older versions they are configured through configs, and we will not talk about it since we are only focusing on later version supports.

## Mod Compatibilities and Auto-detections

Critical Versions:

***PlantTech 2 - 0.02.33 - 1.16.5+***

***PlantTech 2 - 0.02.49 - 1.18.2+***

***PlantTech 2 - 0.02.54 - 1.19.2+***

These versions introduced some great changes to the default config values.

- There are default compressing recipes pre-builded for other mod items. For example - - - *8 planttech2:abyssalnite\_particles -> 1 forge:ingots/abyssalnite*

- There are default seeds pre-builded for other mod items. For example - - - *"crop": "aluminum" has "seeds": ["tag": "forge:gems/aluminum", "tag": "forge:ingots/aluminum"]*

## Creating a datapack

In this example we will be alternating the attributes of crops, by this you can also add crops from other mods.

The order of the datapack does not matter, the added ones will always override default datapack provided by PlantTech 2.

### Setting up a proper datapack:

You need a datapack setup properly, following the tutorial by Minecraft Wiki

### PlantTech 2 crops directory:

Create a directory(folder) inside the pack called "pt2\_crops"

### Adding crop type (cropname.json):

Create a xxx.json (replace xxx with the crop's name) in the folder pt2\_crops, and reload the resources in-game:

* execute command /reload
* is the datapack enabled? /datapack . . .

### Machine recipes directory

There are currently 3 types of configurable.

Create a directory(folder) under /recipes inside the pack called:

* Chipalyzer
* Compressor
* Infuser

depends on which machine recipe you would like to modify.

## Creating crop cropname.json

The mod does not do dynamic registry, it means you may not add or create a new crop type. However we provide various of crop types that may exists in other mods.

All supported crops (The crops are added/removed between major versions Vanilla content changes)

We will be using coal as the example, you can find other crops' default value here

```
{
 "crop": "coal",
 "enabled": true,
 "temperature": "normal",
 "primary\_seed": {
 "item": "planttech2:coal\_seeds",
 "min": 1,
 "max": 4
 },
 "seeds": [],
 "drops": [
 {
 "item": "planttech2:coal\_particles",
 "min": 0,
 "max": 8
 }
 ],
 "parents": [
 {
 "parent\_1": "nether\_wart",
 "parent\_2": "chorus",
 "chance": 0.1
 }
 ],
 "soil": {
 "block": "minecraft:coal\_ore"
 }
}

```

By editing the values you are able to override the original attributes of crops in game. An example.json crop template provided by PlantTech 2, keys with prefix "\_" are comments e.g. "\_crop", "\_primary\_seed"

```
{
 "\_comment": [
 "This is an example crop configuration file.",
 ""
 ],
 "\_crop": "Defines which crop entry this file will configure.",
 "crop": "potato",
 "\_enabled": "When not enabled, crops will not be shown in the Plant Encyclopedia",
 "enabled": true,
 "\_conditions": "Conditions for loading this file (see recipe conditions). This can be used to load crop entries only if i.e. a mod is loaded.",
 "conditions": [
 {
 "type": "forge:mod\_loaded",
 "modid": "examplemod",
 "\_comment": "Condition to make sure this file doesn't load during gameplay"
 }
 ],
 "\_temperature": "Defines what temperature the crop may grow under. Values are [extreme\_cold, cold, normal, warm, extreme\_warm].",
 "temperature": "normal",
 "\_primary\_seed": "The primary seed for use in crop bars, along with its drop chances (dependant on fertility trait).",
 "primary\_seed": {
 "item": "minecraft:carrot",
 "min": 1,
 "max": 4
 },
 "\_seeds": "Additional seed items for use in crop bars. Can be empty.",
 "seeds": [
 "minecraft:carrot\_seeds",
 "planttech2:dancium\_block"
 ],
 "\_drops": "Add possible drops and their chances (dependant on productivity trait) to this crop. Can be empty.",
 "drops": [
 {
 "item": "minecraft:diamond",
 "min": 0,
 "max": 4
 },
 {
 "item": "minecraft:iron\_block",
 "min": 0,
 "max": 2
 },
 {
 "item": "planttech2:dancium\_block",
 "min": 1,
 "max": 5
 }
 ],
 "\_parents": "",
 "parents": [
 {
 "\_partner": "The order of the parents doesn't matter.",
 "parent\_1": "enderdragon",
 "parent\_2": "enderman",
 "\_chance": "The chance to mutate to this crop in %",
 "chance": 5
 },
 {
 "partner\_1": "dirt",
 "partner\_2": "diamond",
 "chance": 2.5
 },
 {
 "partner\_1": "copper",
 "partner\_2": "tin",
 "chance": 6
 }
 ],
 "\_soil": "The soil block that must be present underneath the crop bars. If not defined, defaults to minecraft:dirt",
 "soil": {
 "block": "minecraft:sand"
 }
}

```

## Creating chipalyzer recipe (Legacy, ***BEFORE*** MC 1.20.1)

An example of an Aqua Affinity Chip

You can find other recipes' default values here(before MC 1.20.1)

```
{
 "type": "planttech2:chipalyzer",
 "chip": {
 "item": "planttech2:empty\_upgradechip\_1"
 },
 "input": {
 "enchantment": "minecraft:aqua\_affinity"
 },
 "result": {
 "item": "planttech2:aqua\_affinity\_chip"
 }
}

```

* "type" should always be declared "planttech2:chipalyzer"
* "chip" represents the first input "item"
* "input" represents the second input, and it can be "enchantment", "item", "block", or "tag"
* "result" represents the result, and it can be "item", "block", or "tag"

## Creating chipalyzer recipe (Latest, ***AFTER*** MC 1.20.1)

An example of an Aqua Affinity Chip

You can find other recipes' default values here(after MC 1.20.1)

```
{
 "type": "planttech2:chipalyzer",
 "chip": {
 "count": 1,
 "item": "planttech2:empty\_upgradechip\_1"
 },
 "input": {
 "enchantment": "minecraft:aqua\_affinity"
 },
 "result": {
 "count": 1,
 "item": "planttech2:aqua\_affinity\_chip"
 }
}

```

* "type" should always be declared "planttech2:chipalyzer"
* "chip" represents the first input "item"
* "input" represents the second input, and it can be "enchantment", "item", "block", or "tag"
* "result" represents the result, and it can be "item", "block", or "tag"

## Creating compressor recipe

An example of Coal made of coal particles

You can find other recipes' default values here

```
{
 "type": "planttech2:compressing",
 "input": {
 "item": "planttech2:coal\_particles",
 "count": 8
 },
 "result": {
 "item": "minecraft:coal",
 "count": 1
 }
}

```

* "type" should always be declared "planttech2:compressing"
* "input" represents the particle input, and it can be "item" with "count"
* "result" represents the result, and it can be "item" with "count"

## Creating infuser recipe (Legacy, ***BEFORE*** MC 1.20.1)

An example of Tier 1 Fertilizer

You can find other recipes' default values here

```
{
 "type": "planttech2:infusing",
 "input": {
 "item": "minecraft:bone\_meal",
 "biomass": 100
 },
 "result": {
 "item": "planttech2:fertilizer\_tier\_1"
 }
}

```

* "type" should always be declared "planttech2:infusing"
* "input" represents the particle input, and it can be "item" with "biomass", where is the biomass required to process
* "result" represents the result, and it can be "item"

## Creating infuser recipe (Legacy, ***AFTER*** MC 1.20.1)

An example of Tier 1 Fertilizer

You can find other recipes' default values here

```
{
 "type": "planttech2:infusing",
 "input": {
 "item": "minecraft:bone\_meal",
 "biomass": 100
 },
 "result": {
 "item": "planttech2:fertilizer\_tier\_1"
 }
}

```

* "type" should always be declared "planttech2:infusing"
* "input" represents the particle input, and it can be "item" with "biomass", where is the biomass required to process
* "result" represents the result, and it can be "item"