From 1ef6e33da545fc98c0598ed40ba8d381291468f5 Mon Sep 17 00:00:00 2001 From: EERussianguy Date: Tue, 24 Oct 2023 18:58:03 -0400 Subject: [PATCH] - Add docs folder for 1.20 - Update all worldgen, recipe, and data items that I can think of - Remove stuff that was removed for the port - Update wiki links to use the new minecraft wiki community fork --- 1.18.x/data/custom.md | 4 +- 1.18.x/data/index.md | 2 +- 1.18.x/data/recipes.md | 2 +- 1.18.x/worldgen/common-types.md | 2 +- 1.18.x/worldgen/decorators.md | 2 +- 1.18.x/worldgen/dimension.md | 6 +- 1.18.x/worldgen/features/index.md | 2 +- 1.18.x/worldgen/features/trees.md | 8 +- 1.18.x/worldgen/features/veins.md | 2 +- 1.20.x/data/common-types.md | 195 +++++++++ 1.20.x/data/crafting.md | 147 +++++++ 1.20.x/data/custom.md | 514 ++++++++++++++++++++++ 1.20.x/data/index.md | 88 ++++ 1.20.x/data/ingredients.md | 148 +++++++ 1.20.x/data/item-stack-modifiers.md | 206 +++++++++ 1.20.x/data/recipes-pot.md | 163 +++++++ 1.20.x/data/recipes.md | 632 ++++++++++++++++++++++++++++ 1.20.x/data/tags.md | 155 +++++++ 1.20.x/index.md | 19 + 1.20.x/worldgen/biomes.md | 57 +++ 1.20.x/worldgen/carvers.md | 20 + 1.20.x/worldgen/common-types.md | 200 +++++++++ 1.20.x/worldgen/decorators.md | 113 +++++ 1.20.x/worldgen/dimension.md | 152 +++++++ 1.20.x/worldgen/features/index.md | 410 ++++++++++++++++++ 1.20.x/worldgen/features/trees.md | 114 +++++ 1.20.x/worldgen/features/veins.md | 60 +++ 1.20.x/worldgen/index.md | 25 ++ 1.20.x/worldgen/tags.md | 54 +++ 29 files changed, 3487 insertions(+), 15 deletions(-) create mode 100644 1.20.x/data/common-types.md create mode 100644 1.20.x/data/crafting.md create mode 100644 1.20.x/data/custom.md create mode 100644 1.20.x/data/index.md create mode 100644 1.20.x/data/ingredients.md create mode 100644 1.20.x/data/item-stack-modifiers.md create mode 100644 1.20.x/data/recipes-pot.md create mode 100644 1.20.x/data/recipes.md create mode 100644 1.20.x/data/tags.md create mode 100644 1.20.x/index.md create mode 100644 1.20.x/worldgen/biomes.md create mode 100644 1.20.x/worldgen/carvers.md create mode 100644 1.20.x/worldgen/common-types.md create mode 100644 1.20.x/worldgen/decorators.md create mode 100644 1.20.x/worldgen/dimension.md create mode 100644 1.20.x/worldgen/features/index.md create mode 100644 1.20.x/worldgen/features/trees.md create mode 100644 1.20.x/worldgen/features/veins.md create mode 100644 1.20.x/worldgen/index.md create mode 100644 1.20.x/worldgen/tags.md diff --git a/1.18.x/data/custom.md b/1.18.x/data/custom.md index 706d575..f5b2408 100644 --- a/1.18.x/data/custom.md +++ b/1.18.x/data/custom.md @@ -397,7 +397,7 @@ In summary: ## Sluicing -Sluices link items to loot tables that it processes those items into. This means that any given item can be configured to drop any loot table, even existing loot tables. The loot table generated by sluices has no required context parameters. See the `minecraft:empty` entry in the [Minecraft Wiki article](https://minecraft.fandom.com/wiki/Loot_table) for loot context types. It has the following properties: +Sluices link items to loot tables that it processes those items into. This means that any given item can be configured to drop any loot table, even existing loot tables. The loot table generated by sluices has no required context parameters. See the `minecraft:empty` entry in the [Minecraft Wiki article](https://minecraft.wiki/w/Loot_table) for loot context types. It has the following properties: - `ingredient`: An [Ingredient](../ingredients/) matching the item(s) that will go in the sluice - `loot_table` The location of a loot table to be dropped for this item. @@ -419,7 +419,7 @@ Sluices link items to loot tables that it processes those items into. This means ## Panning -Panning links blocks to loot tables that it processes those blocks into. This means that any given block can be configured to work in the pan and drop any loot table, even existing loot tables. The loot table generated by sluices has three required context parameters: `origin`, the position of the player, `tool`, the pan itself, and `this` (this entity), the player doing the panning. See the `minecraft:fishing` entry in the [Minecraft Wiki article](https://minecraft.fandom.com/wiki/Loot_table) for loot context types. It has the following properties: +Panning links blocks to loot tables that it processes those blocks into. This means that any given block can be configured to work in the pan and drop any loot table, even existing loot tables. The loot table generated by sluices has three required context parameters: `origin`, the position of the player, `tool`, the pan itself, and `this` (this entity), the player doing the panning. See the `minecraft:fishing` entry in the [Minecraft Wiki article](https://minecraft.wiki/w/Loot_table) for loot context types. It has the following properties: - `ingredient`: A [Block Ingredient](../common-types/#block-ingredients) matching the block(s) that will go in the pan - `loot_table` The location of a loot table to be dropped for this block after panning. diff --git a/1.18.x/data/index.md b/1.18.x/data/index.md index 5b930d4..3bf57cf 100644 --- a/1.18.x/data/index.md +++ b/1.18.x/data/index.md @@ -6,7 +6,7 @@ permalink: /1.18.x/data/ # Data -This page is for any non-world generation data used by TFC. All of TFC's data can be configured through [datapacks](https://minecraft.fandom.com/wiki/Recipe). This includes crafting recipes, custom recipes, custom data, and tags. All data here can be loaded in datapacks and can be reloaded during the game using the `/reload` command. +This page is for any non-world generation data used by TFC. All of TFC's data can be configured through [datapacks](https://minecraft.wiki/w/Recipe). This includes crafting recipes, custom recipes, custom data, and tags. All data here can be loaded in datapacks and can be reloaded during the game using the `/reload` command. ### [Crafting Recipes](crafting/) diff --git a/1.18.x/data/recipes.md b/1.18.x/data/recipes.md index ad2396c..8f2a57c 100644 --- a/1.18.x/data/recipes.md +++ b/1.18.x/data/recipes.md @@ -6,7 +6,7 @@ permalink: /1.18.x/data/recipes/ # Recipe Types -Recipes can be configured through [datapacks](https://minecraft.fandom.com/wiki/Recipe). TFC adds a number of recipe types for its custom crafting operations, and they can be used to add, remove, or modify existing recipes. A complete reference of all of TFC's defined recipes, organized into folders depending on their type can be found in the [TFC Github](https://github.com/TerraFirmaCraft/TerraFirmaCraft/tree/1.18.x/src/main/resources/data/tfc/recipes). +Recipes can be configured through [datapacks](https://minecraft.wiki/w/Recipe). TFC adds a number of recipe types for its custom crafting operations, and they can be used to add, remove, or modify existing recipes. A complete reference of all of TFC's defined recipes, organized into folders depending on their type can be found in the [TFC Github](https://github.com/TerraFirmaCraft/TerraFirmaCraft/tree/1.18.x/src/main/resources/data/tfc/recipes). TFC adds the following recipe types: diff --git a/1.18.x/worldgen/common-types.md b/1.18.x/worldgen/common-types.md index 1210df1..741acbe 100644 --- a/1.18.x/worldgen/common-types.md +++ b/1.18.x/worldgen/common-types.md @@ -151,7 +151,7 @@ Or, it can be a string with the registry name of the block to use. In this case, ## Structure -A structure is a reference to an NBT file. They can be created and loaded using [Structure Blocks](https://minecraft.fandom.com/wiki/Structure_Block). +A structure is a reference to an NBT file. They can be created and loaded using [Structure Blocks](https://minecraft.wiki/w/Structure_Block). A structure file must have a file name such as `data//structures/.nbt`, which would then have the structure name `:`. diff --git a/1.18.x/worldgen/decorators.md b/1.18.x/worldgen/decorators.md index 8e77e15..70b4c67 100644 --- a/1.18.x/worldgen/decorators.md +++ b/1.18.x/worldgen/decorators.md @@ -6,7 +6,7 @@ permalink: /1.18.x/worldgen/decorators/ # Decorators -*[Vanilla Reference for Placement Modifiers / Decorators](https://minecraft.fandom.com/wiki/Placed_feature)* +*[Vanilla Reference for Placement Modifiers / Decorators](https://minecraft.wiki/w/Placed_feature)* Note that historically, Placement Modifiers / Placed Features were called Decorators, and TFC still refers to the two interchangeably. TFC adds the following placement modifier types, for use in placed features: diff --git a/1.18.x/worldgen/dimension.md b/1.18.x/worldgen/dimension.md index 2395313..95bb4d7 100644 --- a/1.18.x/worldgen/dimension.md +++ b/1.18.x/worldgen/dimension.md @@ -4,15 +4,15 @@ title: "Dimension" permalink: /1.18.x/worldgen/dimension/ --- -In order to modify the `TerraFirmaCraft` world preset, it is necessary to override the vanilla overworld dimension (`data/minecraft/dimension/overworld.json`). The format of a dimension can be found [here](https://minecraft.fandom.com/wiki/Custom_dimension#Dimension_syntax). Included here is [an example](#example) of an override for the vanilla overworld, with TFC properties set to defaults. +In order to modify the `TerraFirmaCraft` world preset, it is necessary to override the vanilla overworld dimension (`data/minecraft/dimension/overworld.json`). The format of a dimension can be found [here](https://minecraft.wiki/w/Custom_dimension#Syntax_2). Included here is [an example](#example) of an override for the vanilla overworld, with TFC properties set to defaults. Configuration: -- `type` is the namespaced ID of the [dimension type](https://minecraft.fandom.com/wiki/Custom_dimension#Dimension_type). The default is `minecraft:overworld`. +- `type` is the namespaced ID of the [dimension type](https://minecraft.wiki/w/Custom_dimension#Dimension). The default is `minecraft:overworld`. - `generator` is an object: - `type` is the namespaced ID of the chunk generator. It must be `tfc:overworld`. - `seed` is an optional `long` (Default: `0`). It is the seed of the world. - - `noise_settings` is the [noise settings](https://minecraft.fandom.com/wiki/Custom_world_generation#Noise_settings) used in the chunk generator. The default is `minecraft:overworld`. + - `noise_settings` is the [noise settings](https://minecraft.wiki/w/Custom_world_generation#Noise) used in the chunk generator. The default is `minecraft:overworld`. - `flat_bedrock` is a `boolean`. It controls if the bottom layer of bedrock in the world is flat. - `biome_source` is an object: - `type` is the namespaced ID of the biome source. It must be `tfc:overworld`. diff --git a/1.18.x/worldgen/features/index.md b/1.18.x/worldgen/features/index.md index 1adf701..5d57502 100644 --- a/1.18.x/worldgen/features/index.md +++ b/1.18.x/worldgen/features/index.md @@ -6,7 +6,7 @@ permalink: /1.18.x/worldgen/features/ # Features -*[Vanilla Reference for Features](https://minecraft.fandom.com/wiki/Custom_feature)* +*[Vanilla Reference for Features](https://minecraft.wiki/w/Custom_feature)* Features are small decorations that modify individual chunks, based on the biome present in that chunk. In TFC, features are all added to biomes via the use of [Biome Tags](../tags/#biome-tags), which means that they can also be added to biomes via the use of these tags. diff --git a/1.18.x/worldgen/features/trees.md b/1.18.x/worldgen/features/trees.md index 9a88ae0..8697887 100644 --- a/1.18.x/worldgen/features/trees.md +++ b/1.18.x/worldgen/features/trees.md @@ -45,9 +45,9 @@ This feature is used to describe the spawning conditions of a single tree. They - `bush_log`: An optional [Lenient Blockstate](../../common-types/#lenient-blockstate) specifying the log used for bushes. If omitted, no bushes will spawn. - `bush_leaves`: An optional [Lenient Blockstate](../../common-types/#lenient-blockstate) specifying the leaves used for bushes. - `groundcover`: An optional [Weighted List](../../common-types/#weighted-list) specifying the blocks that can spawn on the ground around the trees. - - `normal_tree`: A [Configured Feature](https://minecraft.fandom.com/wiki/Custom_feature#Configured_Feature) which will be used to place a normal tree. - - `dead_tree`: A [Configured Feature](https://minecraft.fandom.com/wiki/Custom_feature#Configured_Feature) which will be used to place a dead tree. - - `old_growth_tree`: An optional [Configured Feature](https://minecraft.fandom.com/wiki/Custom_feature#Configured_Feature) which will be used to place a rare "old growth" tree. + - `normal_tree`: A [Configured Feature](https://minecraft.wiki/w/Configured_featuree) which will be used to place a normal tree. + - `dead_tree`: A [Configured Feature](https://minecraft.wiki/w/Configured_feature) which will be used to place a dead tree. + - `old_growth_tree`: An optional [Configured Feature](https://minecraft.wiki/w/Configured_feature) which will be used to place a rare "old growth" tree. - `old_growth_chance`: (Default: `6`) An optional integer, representing the chance for an old growth tree to be selected. On average, 1 / `old_growth_chance` of trees will be old growth. - `spoiler_old_growth_chance`: (Default: `200`) An optional integer, representing the chance for a old growth tree to spawn in non-old-growth forests. On average, 1 / `spoiler_old_growth_chance` of trees in these areas will be old growth. - `fallen_tree_chance`: (Default: `14`) An optional integer, specifying how often fallen trees spawn. On average, 1 / `fallen_tree_chance` chunks will contain a fallen tree. @@ -67,7 +67,7 @@ This feature chooses structures randomly from a list, and places them. Optionall ### Overlay Tree -This feature uses two structures: a "Base" structure, and an "Overlay" structure. The overlay structure is placed with each of it's blocks randomly chosen to place or not, using the "Integrity" option found in [Structure Blocks](https://minecraft.fandom.com/wiki/Structure_Block). It is used for trees like Oak and Ash. +This feature uses two structures: a "Base" structure, and an "Overlay" structure. The overlay structure is placed with each of it's blocks randomly chosen to place or not, using the "Integrity" option found in [Structure Blocks](https://minecraft.wiki/w/Structure_Block). It is used for trees like Oak and Ash. - Type: `tfc:overlay_tree` - Config: diff --git a/1.18.x/worldgen/features/veins.md b/1.18.x/worldgen/features/veins.md index df46257..e6f7aa0 100644 --- a/1.18.x/worldgen/features/veins.md +++ b/1.18.x/worldgen/features/veins.md @@ -6,7 +6,7 @@ permalink: /1.18.x/worldgen/features/veins/ # Ore Veins -TFC's ore veins are generated using three different features: [Cluster Vein](#cluster-vein), [Disc Vein](#disc-vein), and [Pipe Vein](#pipe-vein). These are used to generate veins that span across many chunks, unlike normal [Features](https://minecraft.fandom.com/wiki/Custom_feature). +TFC's ore veins are generated using three different features: [Cluster Vein](#cluster-vein), [Disc Vein](#disc-vein), and [Pipe Vein](#pipe-vein). These are used to generate veins that span across many chunks, unlike normal [Features](https://minecraft.wiki/w/Custom_feature). In order to do this, veins must be added to **every biome** in the same dimension, even if they cannot spawn in some biomes. Veins must instead whitelist certain biomes using their own biome filter. diff --git a/1.20.x/data/common-types.md b/1.20.x/data/common-types.md new file mode 100644 index 0000000..90ae383 --- /dev/null +++ b/1.20.x/data/common-types.md @@ -0,0 +1,195 @@ +--- +layout: page +title: "Common Types" +permalink: /1.20.x/data/common-types/ +--- + +# Common Types + +Below are a number of common types used by recipes and custom data. + + + +- [Block Ingredients](#block-ingredients) +- [Block State](#block-state) +- [Fluid Ingredients](#fluid-ingredients) +- [Fluid Stack Ingredients](#fluid-stack-ingredients) +- [Fluid Stack](#fluid-stack) +- [Food Traits](#food-traits) +- [Item Stack Ingredients](#item-stack-ingredients) +- [Item Stack Providers](#item-stack-providers) +- [Item Stacks](#item-stacks) +- [Temperature](#temperature) + + + +
+ +## Block Ingredients + +This represents a predicate on blocks in the world. It can be any of the following options: + +- A String, with the registry name of a single block. +- A JSON object, with a single `block` key, with the registry name of a single block. +- A JSON object, with a single `tag` key, with the name of a block tag to match. +- A JSON object, with a `type` key which specifies a custom block ingredient type to use. +- A JSON array, whose entries are [Block Ingredients](#block-ingredients), which are logically OR'd together. + +**Note:** TFC only adds the `tfc:block` and `tfc:tag` types, which are already usable via the above syntaxes for `block` and `tag`, and as a result, are not detailed here. Addons may define other block ingredient types. + +
+ +## Block State + +A block state represents an output of a recipe in world. It must be a string which encodes a block. It must contain the registry name of the block, optionally followed by properties with key value pairs separated by `=`, within square brackets. For example: + +- `minecraft:dirt` : Just specifying a block name. +- `minecraft:grass_block[snowy=true]` : Using the `snowy=true` property. +- `minecraft:oak_stairs[facing=north,half=bottom,shape=straight,waterlogged=false]` : Using multiple properties. + +
+ +## Fluid Ingredients + +A fluid ingredient represents a predicate of fluids. It can be any of the following options: + +- A String, with the registry name of a single fluid. +- A JSON object, with a single `fluid` key, with the registry name of a single fluid. +- A JSON object, with a single `tag` key, with the name of a fluid tag to match. +- A JSon array, whose entries are [Fluid Ingredients](#fluid-ingredients), which are logically OR'd together. + +
+ +## Fluid Stack + +A fluid stack is used to represent a combination of a single fluid with an amount. It is a JSON object which has the following fields: + +- `fluid`: String. The registry name of a Fluid. +- `amount`: Integer. The amount of the fluid stack, in mB. + +#### Example + +```jsonc +// A fluid stack representing a bucket of water +{ + "fluid": "minecraft:water", + "amount": 1000 +} +``` + +
+ +## Fluid Stack Ingredients + +A fluid stack ingredient is a combination of a fluid ingredient with an amount. It is a JSON object which has the following fields: + +- `ingredient`: A [Fluid Ingredient](#fluid-ingredients) +- `amount`: Integer. An amount in mB for this ingredient. Defaults to 1000 mB. + +#### Example + +```jsonc +// A fluid stack ingredient which matches a bucket of water +{ + "ingredient": { "fluid": "minecraft:water" }, + "amount": 1000 +} +``` + +
+ +## Food Traits + +A food trait is a String, which must be one of the following options. Note addons may add other food traits not in this list: + +- `tfc:salted`, `tfc:pickled`, `tfc:brined`, `tfc:preserved`, `tfc:vinegar`, `tfc:charcoal_grilled`, `tfc:wood_grilled`, `tfc:burnt_to_a_crisp` + +## Item Stack Ingredients + +An item stack ingredient is a combination of an ingredient, and a count. It is a JSON object with the following fields: + +- `count`: An optional integer (Default: 1) The count of the item. +- `ingredient`: An [Ingredient](../ingredients/). + +#### Example + +```jsonc +// An item stack ingredient which requires 5 x minecraft:apple +{ + "count": 5, + "ingredient": { + "item": "minecraft:apple" + } +} +``` + +
+ +## Item Stack Providers + +An item stack provider represents an output of a recipe, an item stack with any number of transformations applied to it at recipe completion. These transformations are applied sequentially, starting with the provided stack. It is a JSON object with the following fields: + +- `stack`: An [Item Stack](#item-stacks) This represents the starting stack before transformations are applied. +- `modifiers`: An array of [Item Stack Modifiers](../item-stack-modifiers/). Each modifier is applied sequentially to the output stack, and at the end, the final result is used as the output of the item stack provider. + +**Note:** Any [Item Stack](#item-stacks) will be accepted as a valid item stack provider with no modifiers, if neither the `stack` or `modifiers` keys are present. + +#### Example + +```jsonc +// An item stack provider which produces a minecraft:steak, +// but copies the food traits and expiration date from the input, and sets the temperature to 400 C +{ + "stack": { + "item": "minecraft:steak", + "count": 1 + }, + "modifiers": [ + { "type": "tfc:copy_food" }, + { + "type": "tfc:add_heat", + "temperature": 400 + } + ] +} +``` + +## Item Stacks + +This represents a vanilla Minecraft item stack. It is a JSON object with the following fields: + +- `item`: String. The registry name of the item in the stack. +- `count`: Integer. The count of the item stack. +- `nbt`: An optional object representing NBT data to be added to the item stack. + +#### Example + +```jsonc +// An item stack of 3 x minecraft:apple +{ + "item": "minecraft:apple", + "count": 3 +} +``` + +
+ +
+ +## Temperature + +A temperature is a number, which corresponds to a value in degrees Celsius (°C). In-game, the tooltip displays the color based on the internal temperature value: + +Temperature Range (°C) | Color +---|--- +1 - 80 | **Warming** +80 - 210 | **Hot** +210 - 480 | **Very Hot** +480 - 580 | **Faint Red** +580 - 730 | **Dark Red** +730 - 930 | **Bright Red** +930 - 1100 | **Orange** +1100 - 1300 | **Yellow** +1300 - 1400 | **Yellow-White** +1400 - 1500 | **White** +> 1500 | **Brilliant White** diff --git a/1.20.x/data/crafting.md b/1.20.x/data/crafting.md new file mode 100644 index 0000000..b4ba159 --- /dev/null +++ b/1.20.x/data/crafting.md @@ -0,0 +1,147 @@ +--- +layout: page +title: "Crafting Recipes" +permalink: /1.20.x/data/crafting/ +--- + +# Crafting Recipes + +In addition to custom recipe types, TFC also adds several recipe types that can be used for custom crafting recipes. TFC adds the following crafting recipe types: + + + +- [Advanced Shaped Crafting](#advanced-shaped-crafting) +- [Advanced Shapeless Crafting](#advanced-shapeless-crafting) +- [Casting](#casting) +- [Damage Inputs](#damage-inputs) +- [Extra Products](#extra-products) +- [Food Combining](#food-combining) + + + +
+ +## Advanced Shaped Crafting + +An advanced shaped crafting recipe is a shaped crafting recipe with some additions to support the output using an [Item Stack Provider](../common-types/#item-stack-providers). It has the following properties: + +- `type`: `tfc:advanced_shaped_crafting` +- `group`, `pattern`, `key`, and `conditions` are the same as a usual shaped recipe. +- `result` is an [Item Stack Provider](../common-types/#item-stack-providers), which is the output of the recipe. The "input" stack to the item stack provider is determined by the below `input_row` and `input_column`. +- `input_row` is an integer. +- `input_column` is an integer. + +In a crafting recipe, the `input_row` and `input_column` are zero indexed positions in the *pattern* where the input stack is to be taken from. For example, in the following pattern: + +```jsonc +{ + "pattern": [ + "ABC", // Row 0 + "DEF" // Row 1 + // 0 1 2 Columns + ], + // ... +``` + +In order to use the `F` item as the "input" item stack, the following would be required: + +```jsonc +{ + "input_row": 1, + "input_column": 2 + // ... +``` + +
+ +## Advanced Shapeless Crafting + +An advanced shaped crafting recipe is a shapeless crafting recipe with some additions to support the output using an [Item Stack Provider](../common-types/#item-stack-providers). It has the following properties: + +- `type`: `tfc:advanced_shapeless_crafting` +- `group`, `ingredients`, and `conditions` are the same as a usual shapeless recipe. +- `result` is an [Item Stack Provider](../common-types/#item-stack-providers), which is the output of the recipe. +- `primary_ingredient` is an [Ingredient](../ingredients/), which identifies which slot of the recipe is used as the "input" stack for the result. + +
+ +## Casting + +This is a crafting recipe which acts as a unified recipe for all [Casting Recipes](#casting). It is used when placing a filled, solidified mold in the crafting grid. This recipe will then query a casting recipe, and if a valid one is found, it will produce the output of the casting recipe. It has no configurable options by itself. + +- `type`: `tfc:casting_crafting` + +
+ +## Damage Inputs + +These recipes are used for recipes which want to damage tool inputs, such as knives, axes, etc. when crafted, instead of consuming them. There are two different variants for shaped and shapeless recipes. + +- `type`: `tfc:damage_inputs_shapeless_crafting` or `tfc:damage_inputs_shaped_crafting` +- `recipe`: The crafting recipe which this applies to. Must be the same shaped/shapeless type as the type of the damage inputs recipe. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/crafting/rock/marble_brick.json +// This recipe damages the chisel used rather than consuming it +{ + "type": "tfc:damage_inputs_shapeless_crafting", + "recipe": { + "type": "minecraft:crafting_shapeless", + "ingredients": [{ + "item": "tfc:rock/loose/marble" + }, { + "tag": "tfc:chisels" + }], + "result": { + "item": "tfc:brick/marble" + } + } +} +``` + +
+ +## Extra Products + +This is a recipe type which wraps a normal crafting recipe, but it's used for producing extra products in addition to the normal recipe products. Any extra products are given directly to the player when they craft the recipe. There are two different variants for shaped and shapeless recipes. + +- `type`: `tfc:extra_products_shapeless_crafting` or `tfc:extra_products_shaped_crafting` +- `extra_products`: An Array of [Item Stacks](../common-types/#item-stacks). Each item stack is a single extra product. +- `recipe`: The crafting recipe which this applies to. Must be the same shaped/shapeless type as the type of the damage inputs recipe. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/crafting/maize_cutting.json +// This recipe uses nested recipe types, both producing extra products (straw) and damaging the knife used +{ + "type": "tfc:extra_products_shapeless_crafting", + "extra_products": [{ + "item": "tfc:straw" + }], + "recipe": { + "type": "tfc:damage_inputs_shapeless_crafting", + "recipe": { + "type": "minecraft:crafting_shapeless", + "ingredients": [{ + "item": "tfc:food/wheat" + }, { + "tag": "tfc:knives" + }], + "result": { + "item": "tfc:food/wheat_grain" + } + } + } +} +``` + +## Food Combining + +This is a crafting recipe which merges foods of the same traits, but with different creation dates. It has no configurable options by itself. + +- `type`: `tfc:food_combining` + +
diff --git a/1.20.x/data/custom.md b/1.20.x/data/custom.md new file mode 100644 index 0000000..dcc682f --- /dev/null +++ b/1.20.x/data/custom.md @@ -0,0 +1,514 @@ +--- +layout: page +title: "Custom Data" +permalink: /1.20.x/data/custom/ +--- + +# Custom Data + +In addition to recipes, TFC defines and loads a number of completely custom data types. These can also be loaded by datapacks, and all are under the root path `tfc`, meaning that any added data should be located under `/data//tfc//...`. + +TFC defines the following custom data types: + + + +- [Climate Ranges](#climate-ranges) +- [Damage Resistances](#damage-resistances) +- [Drinkables](#drinkables) +- [Fauna](#fauna) +- [Fertilizers](#fertilizers) +- [Food Items](#food-items) +- [Fuels](#fuels) +- [Item Heats](#item-heats) +- [Item Sizes](#item-sizes) +- [Knapping Types](#knapping-types) +- [Lamp Fuels](#lamp-fuels) +- [Metals](#metals) +- [Panning](#panning) +- [Sluicing](#sluicing) +- [Supports](#supports) + + + +
+ +## Climate Ranges + +A climate range allows TFC Blocks to reference configurable data related to climate. They specify the range of values that a block can grow in. + +**Note:** Climate ranges cannot be added through datapacks, only modified. + +A climate range has the following properties: + +- `min_hydration` An optional integer [0, 100], by default 0, specifying the minimum hydration. +- `max_hydration`: An optional integer [0, 100], by default 100, specifying the maximum hydration. +- `hydration_wiggle_range`: An optional integer, by default 0, specifying the 'wiggle' range of the block when consulting wiggliness is enabled. +- `min_temperature`: An optional integer, by default -100, specifying the minimum temperature. +- `max_temperature`: An optional integer, by default 100, specifying the maximum temperature. +- `temperature_wiggle_range`: An optional integer, by default 0, specifying the 'wiggle' range of the block when consulting wiggliness is enabled. + +#### Examples +```jsonc +// Reference: data/tfc/tfc/climate_ranges/barley +{ + "min_hydration": 18, + "max_hydration": 75, + "hydration_wiggle_range": 0, + "min_temperature": -8, + "max_temperature": 26, + "temperature_wiggle_range": 5 +} +``` + +
+ +## Damage Resistances + +Damage Resistances specify extra resistance to certain damage types. They can be applied to either items (which will apply when worn as armor), or to entities (i.e. mobs). + +All Damage Resistances have the following properties, each of which specifies either a resistance (positive), or a weakness (negative) to a specific damage type: + +- `piercing`: An optional integer (Default: `0`). +- `slashing`: An optional integer (Default: `0`). +- `crushing`: An optional integer (Default: `0`). + +Resistance is calculated as a multiplicative factor to the damage dealt. The formula for damage dealt is `damage = base_damage * exp(-0.01 * )`. This means that resistances are additive (i.e. two `+10`s are the same as a single `+20`), and cancel out (a `+10` resistance and `-10` weakness cancel each other out), and have diminishing returns the more resistance you accumulate. + +For **entities**, damage resistances are found under the subfolder `entity_damage_resistances`, and must have an additional property: + +- `entity`: An Entity Tag, specifying what entities this resistance applies to. + +For **armor items**, damage resistances are found under the subfolder `item_damage_resistances`, and must have an additional property: + +- `ingredient: An [Ingredient](../ingredients/), specifying what items this resistance applies to. + +#### Examples + +```jsonc +// Reference: data/tfc/tfc/entity_damage_resistances/skeletons.json +{ + "entity": "tfc:skeletons", + "piercing": 1000000000, // large number to cause very high resistance + "slashing": 0, + "crushing": -50 // negative number to cause weakness +} +``` + +
+ +## Drinkables + +A drinkable defines that a fluid is directly drinkable. Drinkable fluids can be drank either from an empty hand while right clicking on a source block, or from a container such as the ceramic vessel which allows drinking. The drinkable also defines various effects that the fluid can have on the player when drank. It is located under the subfolder `drinkables`. + +When drinking from a source block, the player consumes 25 mB of the drinkable. Other sources, such as ceramic jugs, consume larger quantities. Note that some drinkable effects are all scaled based on the amount drank. + +A drinkable has the following properties: + +- `ingredient`: An [Fluid Ingredient](../common-types/#fluid-ingredients), which defines which fluids this drinkable applies to. +- `consume_chance`: An optional number in the range [0, 1] (Default: 0). It represents the chance that, when drank from a source block, the source block is removed. +- `thirst`: An optional integer in the range [0, 100] (Default: 0). It represents an amount of thirst that this drinkable consumes, per 25 mB drank. +- `intoxication`: An optional integer (Default: 0). It represents a number of ticks that the player will be intoxicated for, per 25 mB drank. +- `effects` is a array of custom potion effects that this drinkable can apply. Each entry must be an object with the following properties: + - `type`: A string, which is the registry ID of a potion effect (i.e. `minecraft:slowness`). + - `duration`: An optional integer (Default: 20) which is a number of ticks this effect is applied for. + - `amplifier`: An optional integer (Default: 0) which is the level of the potion effect applied. + - `chance`: An optional number in the range [0, 1] (Default: 1). This represents the chance that this particular effect will be applied per 25 mB drank. + +#### Example: + +```jsonc +// Reference: data/tfc/tfc/drinkables/alcohol.json +{ + "ingredient": { + "tag": "tfc:alcohols" + }, + "thirst": 10, + "intoxication": 4000 +} +``` + +
+ +## Fauna + +Fauna allow datapacks to specify some spawning requirements for mobs. + +**Note:** Fauna cannot be added with datapacks, only modified. + +Fauna have the following properties: + +- `chance`: An optional integer, by default 1, of the chance in 1/N chunks that something will spawn. Note that the ratio between mob spawns is better set in the [Biome](../../worldgen/biomes/) json, as those values are baked into the spawn generator. +- `distance_below_sea_level`: An optional integer that sets the distance below sea level something must spawn. This should only be set for underwater creatures. +- `climate`: A [Climate Decorator](../../worldgen/decorators/#climate) configuration for the climate requirements of the fauna. +- `solid_ground`: A boolean. Requires the mob to spawn on a `minecraft:valid_spawn` block tag. +- `max_brightness`: An optional integer specifying the maximum brightness a mob may spawn at. + +#### Example + +```jsonc +// Reference: data/tfc/tfc/fauna/orca +{ + "chance": 10, + "distance_below_sea_level": 35, + "climate": { + "max_temperature": 19, + "min_rainfall": 100 + } +} +``` + +## Fertilizers + +A fertilizer defines an item which can be used on farmland or crops to increase the nutrients in the soil (farmland). Nutrients are used and consumed by crops to increase their yield. It is located under the subfolder `fertilizers`. A fertilizer has the following properties: + +- `ingredient`: An [Ingredient](../ingredients/), which defines which items this fertilizer applies to. +- `nitrogen`: A number (Default `0.0`). Defines how much **Nitrogen** nutrient this fertilizer adds. +- `phosphorus`: A number (Default `0.0`). Defines how much **Phosphorous** nutrient this fertilizer adds. +- `potassium`: A number (Default `0.0`). Defines how much **Potassium** nutrient this fertilizer adds. + +#### Example + +```jsonc +// Reference: data/tfc/tfc/fertilizers/bone_meal.json +{ + "ingredient": { + "item": "minecraft:bone_meal" + }, + "potassium": 0.1 +} +``` + +
+ +## Food Items + +A food item definition defines a food, and applies TFC style stats to it including decay, hunger, water, and nutrition. It is a file located under the subfolder `food_items`. It has the following properties: + +- `ingredient`: An [Ingredient](../ingredients/) to which this food item definition applies to. +- `type`: An optional string, either `dynamic` or `dynamic_bowl`. If this parameter is specified, none of the parameters below should be used, as the food values are specified via code. +- `hunger`: An integer (Default `4`). Defines how much hunger this food restores. The player's full hunger bar is equal to `20`. +- `saturation`: A number (Default `0.0`). Defines how much saturation this food restores. Measured in the same units as hunger. +- `water`: A number (Default `0.0`). Defines how much water this food restores. The player's full water bar is equal to `100`. +- `decay_modifier`: A number (Default `1.0`). Defines how quickly this item decays. Higher values indicate faster decay, and thus shorter expiration times. +- `grain`: A number (Default `0.0`). Defines how much **Grain** nutrient this food adds. +- `fruit`: A number (Default `0.0`). Defines how much **Fruit** nutrient this food adds. +- `vegetables`: A number (Default `0.0`). Defines how much **Vegetables** nutrient this food adds. +- `protein`: A number (Default `0.0`). Defines how much **Protein** nutrient this food adds. +- `dairy`: A number (Default `0.0`). Defines how much **Dairy** nutrient this food adds. + +**Note:** Typical values for nutrients are 0-2 for small items (fruits, vegetables), and 1-4 for larger items (breads, meats), and higher for meals. Note that nutrients should also scale with hunger: A 2 nutrient/4 hunger food is the same (nutritionally) as a 4 nutrient/8 hunger food. + +**Dynamic Foods** + +Dynamic food items are used most typically for *meals*, foods who get their nutrition values from their constituent ingredients. For sandwiches (and datapack-added meals [created by crafting](../item-stack-modifiers#meal)) the `type` should be `dynamic`. For salads and soups, `dynamic_bowl` is required. Note that dynamic foods have *no* nutrition by default, so they require either special recipes or devices to work! This is doubly true for dynamic bowl foods. They will not work unless they are made via the in-game salad or soup methods! + +An example dynamic food json: +```jsonc +// Reference: data/tfc/tfc/food_items/barley_sandwich +{ + "ingredient": { + "item": "tfc:food/barley_bread_sandwich" + }, + "type": "dynamic" +} +``` + + +
+ +## Fuels + +A fuel defines something that burns, and can be used in a fire pit, forge, or other TFC fuel consuming device. It is a file located under the subfolder `fuels`. It has the following properties: + +- `ingredient`: An [Ingredient](../ingredients/) to which this fuel applies to. +- `temperature`: A number. The temperature in degrees Celsius that this fuel burns at. +- `duration`: An integer. The duration in ticks that a single item of this fuel burns for. + +#### Example + +```jsonc +// Reference: data/tfc/tfc/fuels/coal.json +{ + "ingredient": [ + { "item": "minecraft:coal" }, + { "item": "tfc:ore/bituminous_coal" } + ], + "duration": 2200, + "temperature": 1415 +} +``` + +
+ +## Item Heats + +An item heat definition specifies if an item can be heated, and also properties of the heated item. It is a file located under the subfolder `item_heats`. It has the following properties: + +- `ingredient`: An [Ingredient](../ingredients/) to which this item heat definition applies to. +- `heat_capacity`: A number which specifies how fast this item heats up relative to others. This is measured in Energy / °C, meaning higher values indicate it takes more energy (time) to heat up. +- `forging_temperature`: An optional number which specifies the temperature at which this item can be worked, in degrees Celsius. If omitted, this item will not require heat to work. +- `welding_temperature`: An optional number which specifies the temperature at which this item can be worked, in degrees Celsius. If omitted, this item will not require heat to weld. + +#### Example + +```jsonc +// Reference: data/tfc/tfc/item_heats/metal/bismuth_bronze_ingot.json +{ + "ingredient": { + "tag": "forge:ingots/bismuth_bronze" + }, + "heat_capacity": 2.857, + "forging_temperature": 591.0, + "welding_temperature": 788.0 +} +``` + +
+ +## Item Sizes + +An item size definition specifies the size and weight of items. Size affects what containers the item can fit in: + +- Small vessels can hold items that are `Small` and lower. +- Large vessels can hold items that are `Normal` and lower. +- Chests can hold items that are `Large` and lower. +- Pit Kilns can hold four items that are `Large` and lower, or one item which is `Very Large` or `Huge` + +Weight affects the stack size of the item (and TFC will override the stack size where possible): + +- `Very Light` items will stack to 64. +- `Light` items will stack to 32. +- `Medium` items will stack to 16. +- `Heavy` items will stack to 4. +- `Very Heavy` items will stack to 1. + +Finally, items that are both `Huge` size and `Very Heavy` weight will count towards the player being **Overburdened**. This includes Anvils, Sealed Barrels, and Sealed Large Vessels in TFC. + + An Item Size Definition is a file located in under the subfolder `item_sizes`. It has the following properties: + +- `ingredient`: An [Ingredient](../ingredients/) to which this item size definition applies to. +- `size`: An optional string, which must be one of the following sizes: `tiny`, `very_small`, `small`, `normal`, `large`, `very_large`, or `huge`. Defaults to `normal`. +- `weight`: An optional string, which must be one of the following weights: `very_light`, `light`, `medium`, `heavy`, `very_heavy`. Defaults to `medium`. + +Note that TFC will attempt to apply defaults for all items that do not have item sizes. It uses the following rules: + +1. If the `Item` or `Block` specifies a custom item size implementation. +2. If a item size definition is found matching the item. +3. If the item is a tool (`instanceof TieredItem`), it will be `Large` and `Medium`. +4. If the item is a piece of armor (`instanceof ArmorItem`), it will be `Large` and `Very Heavy`. +5. If the item is a block (`instanceof BlockItem`), it will be `Small` and `Light`. +6. All other items will be `Very Small` and `Very Light`. + +#### Example + +```jsonc +// Reference: data/tfc/tfc/item_sizes/straw.json +{ + "ingredient": { + "item": "tfc:straw" + }, + "size": "small", + "weight": "very_light" +} +``` + +
+ +## Knapping Types + +A knapping type specifies a new thing that can be knapped, and how it is knapped. Knapping types are specified as part of [Knapping Recipes](../recipes/#knapping) + +Button textures for knapping screens are specified based on the registry name of the item. For example, `minecraft:leather` points to `tfc:textures/gui/knapping/leather`. Note that it is only the path of the item that gets used, and that it always points to the `tfc` namespace to avoid mod conflicts. For a disabled texture, add `_disabled` to the path. + +It has the following properties: + +- `input`: An [Item Stack Ingredient](../common-types/#item-stack-ingredients) for what item has to be knapped. These items typically are tagged (for example, `tfc:leather_knapping` for leathers that can be knapped). The item (or tag) must be added to the `tfc:any_knapping` tag for this to work. +- `amount_to_consume`: An Integer. The amount of the item that gets used by the recipe. +- `click_sound`: A registered sound that plays when the knapping occurs. +- `consume_after_complete`: A boolean. If the `amount_to_consume` of your `input` should be consumed as soon as you click one square or when the item is removed from the result slot. +- `use_disabled_texture`: A boolean. If true, a clicked slot will show a different texture rather than nothing at all. +- `spawns_particles`: A boolean. If true, the screen will spawn small 'particles' when clicking the buttons. +- `jei_icon_item`: An [Item Stack](../common-types/#item-stacks) that is shown in the automatically generated JEI category for this knapping type. + +#### Example + +```jsonc +// Reference: data/tfc/tfc/knapping_types/rock.json +{ + "input": { + "ingredient": { + "tag": "tfc:rock_knapping" + }, + "count": 2 + }, + "amount_to_consume": 1, + "click_sound": "tfc:item.knapping.stone", + "consume_after_complete": false, + "use_disabled_texture": false, + "spawns_particles": true, + "jei_icon_item": { + "item": "tfc:rock/loose/granite" + } +} +``` + + +
+ +## Lamp Fuels + +A lamp fuel is a fluid which an be used in a lamp. It will burn over time, consuming mB per tick in order to keep the lamp lit. It has the following properties: + +- `fluid`: A [Fluid Ingredient](../common-types/#fluid-ingredients) which determines which fluids this lamp fuel applies to. +- `valid_lamps`: A [Block Ingredient](../common-types/#block-ingredients) which determines what (lamp) blocks are valid for this fuel to be added to. +- `burn_rate` An integer, representing how fast this lamp consumes fuel, in ticks per mB. + +#### Example + +```jsonc +// Reference: data/tfc/tfc/lamp_fuels/olive_oil.json +{ + "fluid": "tfc:olive_oil", + "valid_lamps": { + "type": "tfc:tag", + "tag": "tfc:lamps" + }, + "burn_rate": 8000 +} +``` + +
+ +## Metals + +A metal specifies a new metal to be used by TFC. A metal is required in order to melt items into metal fluids, or use metals as ingredients in alloys. Notably, this **does not add new items or blocks** to the game, but only defines a metal to TFC, and how to translate it between fluids and metals. A metal is a file located in under the subfolder `metals`. It has the following properties: + +- `tier`: An optional integer, of the tier of the metal. Defaults to `0`. +- `fluid`: The registry name of a fluid which corresponds to this metal. +- `melt_temperature`: A number. The melting temperature of the fluid of this metal. +- `specific_heat_capacity`: A number which specifies how fast this metal fluid heats up relative to others. This is measured in Energy / (mB x °C), meaning it's scaled relative to a quantity of mB, and that higher values will cause it to require more energy (time) to heat up. +- `ingots`: An [Ingredient](../ingredients/) which defines ingot items that are of this metal. This is used in order to allow other mod ingots to be placed in ingot piles. +- `sheets`: An [Ingredient](../ingredients/) which defines sheet items that are of this metal. This is used in order to allow other mod sheets to be placed in sheet piles. + +**Note** There must be a **unique** fluid for every metal. Creating multiple metals that reference the same fluid is liable to cause undefined behavior and may introduce bugs! + +#### Example + +```jsonc +// Reference: data/tfc/tfc/metals/bismuth_bronze.json +{ + "tier": 2, + "fluid": "tfc:metal/bismuth_bronze", + "melt_temperature": 985, + "specific_heat_capacity": 0.00857, + "ingots": { + "tag": "forge:ingots/bismuth_bronze" + }, + "sheets": { + "tag": "forge:sheets/bismuth_bronze" + } +} +``` + +##### Adding Textures + +Each metal references a hardcoded texture location, by the name `:block/metal/full/`. This texture is then used to render both ingot piles and sheet piles. + +**Example** + +> `tfc:bismuth_bronze` references `tfc:textures/block/metal/full/bismuth_bronze.png` +> `yourmod:yourmetal` would reference `yourmod:textures/block/metal/full/yourmetal.png` + +When adding a texture yourself (i.e. via a resource pack), it will also need to be added to the atlas. TFC can do this for you, by adding the texture to `tfc-client.toml`: + +```toml +[compatibility] + # Defines additional metal sheet textures that should be added to the block atlas, as they would be otherwise unused, for use in ingot piles and metal sheet blocks. + # For Pack Makers: When adding a Metal via a datapack, with a custom texture "domain:block/my_texture", and you get missing textures in ingot piles and sheet blocks, that texture needs to be added here + additionalMetalSheetTextures = [":block/metal/full/"] +``` + +In summary: + +- If your metal is added at `data/yourmod/tfc/metals/yourmetal.json` +- It implicitly has the name `yourmod:yourmetal`, +- A texture must exist in a resource pack by the path `assets/yourmod/textures/block/metal/full/yourmetal.png` +- In `tfc-client.toml`, you must add the entry `"yourmod:block/metal/full/yourmetal"` to the `additionalMetalSheetTextures` list. + +
+ +## Sluicing + +Sluices link items to loot tables that it processes those items into. This means that any given item can be configured to drop any loot table, even existing loot tables. The loot table generated by sluices has no required context parameters. See the `minecraft:empty` entry in the [Minecraft Wiki article](https://minecraft.wiki/w/Loot_table) for loot context types. It has the following properties: + +- `ingredient`: An [Ingredient](../ingredients/) matching the item(s) that will go in the sluice +- `loot_table` The location of a loot table to be dropped for this item. + +### Example + +```jsonc +// Reference: data/tfc/tfc/sluicing/deposits/cassiterite_andesite.json +{ + "ingredient": { + "item": "tfc:deposit/cassiterite/andesite" + }, + "loot_table": "tfc:panning/deposits/cassiterite_andesite" +} + +``` + +
+ +## Panning + +Panning links blocks to loot tables that it processes those blocks into. This means that any given block can be configured to work in the pan and drop any loot table, even existing loot tables. The loot table generated by sluices has three required context parameters: `origin`, the position of the player, `tool`, the pan itself, and `this` (this entity), the player doing the panning. See the `minecraft:fishing` entry in the [Minecraft Wiki article](https://minecraft.wiki/w/Loot_table) for loot context types. It has the following properties: + +- `ingredient`: A [Block Ingredient](../common-types/#block-ingredients) matching the block(s) that will go in the pan +- `loot_table` The location of a loot table to be dropped for this block after panning. +- `model_stages`: An array of model locations that will be iterated through and rendered as panning progresses. If no panning is in progress, just the first model is rendered. This array must not be empty, but can be any length. + +Models defined here *must* be added to the Forge special model registry. This can happen a few ways: +- Addons calling `ForgeModelBakery#addSpecialModel` during `ModelRegistryEvent` +- TFC already registering the model +- Pack makers adding models to the client config (`tfc-client.toml`) option `additionalSpecialModels` to have them registered automatically, but this option is not preferred. + +For packmakers using the config option, the model file should be at `domain:assets/models/my/favorite/folder.json` where it implicitly has the name `domain:my/favorite/folder` in the eyes of the game. The implicit name is what should be specified in the config file. + +### Example + +```jsonc +// Reference: data/tfc/tfc/panning/deposits/native_gold_quartzite.json +{ + "ingredient": "tfc:deposit/native_gold/quartzite", + "model_stages": [ + "tfc:item/pan/native_gold/quartzite_full", + "tfc:item/pan/native_gold/quartzite_half", + "tfc:item/pan/native_gold/result" + ], + "loot_table": "tfc:panning/deposits/native_gold_quartzite" +} + +``` + +
+ +## Supports + +Supports define blocks which prevent collapses from **starting** within a specific radius. They do not prevent collapses that started outside the support radius from causing blocks to collapse within the supported area. A support is a file located in under the subfolder `supports`. It has the following properties: + +- `ingredient`: A [Block Ingredient](../common-types/#block-ingredients) which defines what blocks this support applies to. +- `support_up`: Integer (Default `0`). The number of blocks upwards that this block supports. +- `support_down`: Integer (Default `0`). The number of blocks downwards that this block supports. +- `support_horizontal`: Integer (Default `0`). The number of blocks horizontally that this block supports. + +#### Example + +```jsonc +// Reference: data/tfc/tfc/supports/ash.json +{ + "ingredient": "tfc:wood/horizontal_support/ash", + "support_up": 1, + "support_down": 1, + "support_horizontal": 4 +} +``` diff --git a/1.20.x/data/index.md b/1.20.x/data/index.md new file mode 100644 index 0000000..74cb68e --- /dev/null +++ b/1.20.x/data/index.md @@ -0,0 +1,88 @@ +--- +layout: page +title: "Data" +permalink: /1.20.x/data/ +--- + +# Data + +This page is for any non-world generation data used by TFC. All of TFC's data can be configured through [datapacks](https://minecraft.wiki/w/Recipe). This includes crafting recipes, custom recipes, custom data, and tags. All data here can be loaded in datapacks and can be reloaded during the game using the `/reload` command. + +### [Crafting Recipes](crafting/) + +These are custom crafting recipe types that are used by TFC. + + + +- [Advanced Shaped Crafting](crafting/#advanced-shaped-crafting) +- [Advanced Shapeless Crafting](crafting/#advanced-shapeless-crafting) +- [Casting](crafting/#casting) +- [Damage Inputs](crafting/#damage-inputs) +- [Extra Products](crafting/#extra-products) +- [Food Combining](crafting/#food-combining) + + + +### [TFC Recipes](recipes/) + +These are custom recipe types that are loaded by TFC, for TFC devices. + + + +- [Alloy](recipes/#alloy) +- [Anvil Welding](recipes/#anvil-welding) +- [Anvil Working](recipes/#anvil-working) +- [Barrel Instant](recipes/#barrel-instant) +- [Barrel Sealed](recipes/#barrel-sealed) +- [Bloomery](recipes/#bloomery) +- [Casting](recipes/#casting) +- [Collapse](recipes/#collapse) +- [Heating](recipes/#heating) +- [Knapping (Clay, Fire Clay, Leather)](./recipes/#knapping) +- [Landslide](recipes/#landslide) +- [Loom](recipes/#loom) +- [Pot](recipes-pot/) +- [Quern](recipes/#quern) +- [Rock Knapping](recipes/#rock-knapping) +- [Scraping](recipes/#scraping) + + + +### [TFC Data](custom/) + +These are custom data types that are loaded by TFC. + + + +- [Damage Resistances](custom/#damage-resistances) +- [Drinkables](custom/#drinkables) +- [Fertilizers](custom/#fertilizers) +- [Food Items](custom/#food-items) +- [Fuels](custom/#fuels) +- [Item Heats](custom/#item-heats) +- [Item Sizes](custom/#item-sizes) +- [Lamp Fuels](custom/#lamp-fuels) +- [Metals](custom/#metals) +- [Supports](custom/#supports) + + + +### Misc + + + +- [Block Ingredients](common-types/#block-ingredients) +- [Block State](common-types/#block-state) +- [Fluid Ingredients](common-types/#fluid-ingredients) +- [Fluid Stack Ingredients](common-types/#fluid-stack-ingredients) +- [Fluid Stack](common-types/#fluid-stack) +- [Food Traits](common-types/#food-traits) +- [Ingredients](ingredients/) +- [Item Stack Ingredients](common-types/#item-stack-ingredients) +- [Item Stack Modifiers](item-stack-modifiers/) +- [Item Stack Providers](common-types/#item-stack-providers) +- [Item Stacks](common-types/#item-stacks) +- [Tags](tags/) +- [Temperature](common-types/#temperature) + + diff --git a/1.20.x/data/ingredients.md b/1.20.x/data/ingredients.md new file mode 100644 index 0000000..b8d63ee --- /dev/null +++ b/1.20.x/data/ingredients.md @@ -0,0 +1,148 @@ +--- +layout: page +title: "Ingredients" +permalink: /1.20.x/data/ingredients/ +--- + +# Ingredients + +An ingredient represents an input to a recipe or other piece of data. All vanilla and modded recipes should support ingredients and can use any of the following ingredients. It must be a JSON object with one of the following keys: + +1. An `item` key with the registry name of an item. +2. A `tag` key with the registry name of an item tag. +3. A `type` key with the name of a custom ingredient type. + +In addition to the two ingredients added by Minecraft, TFC adds a number of custom ingredients which can be used anywhere an `Ingredient` is required, even by other mod's recipes. TFC adds the following ingredient types: + +- [Not Rotten](#not-rotten) +- [Has Trait](#has-trait) +- [Lacks Trait](#lacks-trait) +- [Heatable](#heatable) +- [Not](#not) +- [Fluid Item](#fluid-item) + +
+ +## Not Rotten + +This is an ingredient which only accepts food items if they are not rotten. It has the following fields: + +- `type`: `tfc:not_rotten` +- `ingredient`: An optional [Ingredient](../ingredients/), to which this is applied. If omitted, this will accept **all** non-rotten items. + +#### Example: + +```jsonc +// An ingredient which only accepts non-rotten minecraft:steak +{ + "type": "tfc:not_rotten", + "ingredient": { "item": "minecraft:steak" } +} +``` + +
+ +## Has Trait + +This is an ingredient which only accepts food items if they have a specific trait. It has the following fields: + +- `type`: `tfc:has_trait` +- `trait`: String. The registry name of a [Food Trait](../common-types/#food-traits) which must be present. +- `ingredient`: An optional [Ingredient](../ingredients/), to which this is applied. If omitted, this will accept **all** items with the provided trait. + +#### Example + +```jsonc +// An ingredient which only accepts a brined tfc:food/apple +{ + "type": "tfc:has_trait", + "trait": "tfc:brined", + "ingredient": { "item": "tfc:food/apple" } +} +``` + +
+ + +## Lacks Trait + +This ingredient is the same as [Has Trait](#has-trait) but is inverted. It tests if a food lacks a specified trait. + +- `type`: `tfc:lacks_trait` +- `trait`: String. The registry name of a [Food Trait](../common-types/#food-traits) which must be present. +- `ingredient`: An optional [Ingredient](../ingredients/), to which this is applied. If omitted, this will accept **all** items without the provided trait. + +#### Example + +```jsonc +// An ingredient which only accepts a tfc:food/apple which has not been brined +{ + "type": "tfc:lacks_trait", + "trait": "tfc:brined", + "ingredient": { "item": "tfc:food/apple" } +} +``` + +## Heatable + +This is an ingredient which only accepts items if they are heatable, and optionally currently within a certain temperature range. It has the following fields: + +- `type`: `tfc:heatable` +- `min_temp`: Optional integer. The minimum temperature this item must have, in degrees Celsius. Defaults to accepting any temperature. +- `max_temp`: Optional integer. The maximum temperature this item must have, in degrees Celsius. Defaults to accepting any temperature. +- `ingredient`: An optional [Ingredient](../ingredients/), to which this is applied. If omitted, this will accept **all** items with the provided heat. + +#### Example + +```jsonc +// An ingredient which only accepts minecraft:iron_ingots if they are heated between 300 and 400 C +{ + "type": "tfc:heatable", + "min_temp": 300, + "max_temp": 400, + "ingredient": { "item": "minecraft:iron_ingot" } +} +``` + +
+ +## Not + +An ingredient which inverts an existing ingredient. It has the following fields: + +- `type`: `tfc:not` +- `ingredient`: An optional [Ingredient](../ingredients/), to which this is applied. If omitted, this will accept **any** item. + +#### Example + +```jsonc +// An ingredient which accepts ANY rotten food +{ + "type": "tfc:not", + "ingredient": { + "type": "tfc:not_rotten" + } +} +``` + +
+ +## Fluid Item + +An ingredient which expects an item to contain a fluid (such as a bucket). It has the following fields: + +- `type`: `tfc:fluid_item` +- `ingredient`: An optional [Ingredient](../ingredients/), to which this is applied. If omitted, this will accept **any** item. +- `fluid_ingredient`: A [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients), which must match the fluid contained in the item. + +```jsonc +// An ingredient which accepts a ceramic jug containing fresh water +{ + "type": "tfc:fluid_item", + "ingredient": { "item": "tfc:ceramic/jug" }, + "fluid_ingredient": { + "amount": 100, + "ingredient": { "fluid": "minecraft:water" } + } +} +``` diff --git a/1.20.x/data/item-stack-modifiers.md b/1.20.x/data/item-stack-modifiers.md new file mode 100644 index 0000000..c28cdf2 --- /dev/null +++ b/1.20.x/data/item-stack-modifiers.md @@ -0,0 +1,206 @@ +--- +layout: page +title: "Item Stack Modifiers" +permalink: /1.20.x/data/item-stack-modifiers/ +--- + +# Item Stack Modifiers + +An item stack modifier is a entry in a [Item Stack Provider](../common-types/#item-stack-providers). It must contain at least a `type` field which identifies the type of the modifier. Modifiers may also require additional properties based on their type. + +Note that some modifiers only function when used in crafting recipes that support the use of an [Item Stack Provider](../common-types/#item-stack-providers), that is, [Advanced Shaped Recipe](../../data/crafting/#advanced-shaped-crafting) and [Advanced Shapeless Recipe](../../data/crafting/#advanced-shapeless-crafting). + +TFC adds the following item stack modifier types: + + + +- [Add Bait to Rod](#add-bait-to-rod) +- [Add Glass](#add-glass) +- [Add Heat](#add-heat) +- [Add Powder](#add-powder) +- [Add Trait](#add-trait) +- [Copy Food](#copy-food) +- [Copy Forging Bonus](#copy-forging-bonus) +- [Copy Heat](#copy-heat) +- [Copy Input](#copy-input) +- [Empty Bowl](#empty-bowl) +- [Remove Trait](#remove-trait) +- [Reset Food](#reset-food) +- [Meal](#meal) + + + +
+ +## Meal + +This modifier combines nutrients from various foods in a crafting grid into a single food result item. The resulting food must be a *dynamic food item*, such as sandwiches. You can read about how dynamic foods work [here](../custom/#food-items). It has the following parameters: + +- `type`: `tfc:meal` +- `food`: A food data object that describes stats that will always be added to the final food item, specifying all the same parameters for a food's nutrients, decay, water, etc. It follows the same specification as specifying a static food in [a food item json](../custom/#food-items), but without the `ingredient` parameter. +- `portions`: A list of meal portion objects. These objects are checked in order, and the first one to match a food in the crafting grid has its food data added to the result item according to the specification. Note that portions describe how the components of the specified recipe are *used*. They have no bearing on what ingredients are *allowed* in the recipe. A meal portion has the following parameters: + - `ingredient`: An optional [Ingredient](../ingredients/). If not included, the portion will match all foods. Typically, a meal portion with no ingredient would be specified last in the array of portions, in order to catch all the remaining foods that haven't been used. + - `nutrient_modifier`: An optional float, default `1.0`, that multiplies the nutrition from the food using this portion. + - `water_modifier`: An optional float, default `1.0`, that multiplies the water from the food using this portion. + - `saturation_modifier`: An optional float, default `1.0`, that multiplies the saturation from the food using this portion. + +An example for how to specify a meal modifier is below. Note that the `//` comments in the json are for educational purposes and will cause loading to fail in some json specifications. +```jsonc +// Reference: data/tfc/recipes/crafting/oat_sandwich.json +{ + "type": "tfc:meal", + // this food information is always added to the final sandwich + "food": { + "hunger": 4, + "water": 0.5, + "saturation": 1, + "decay_modifier": 4.5 + }, + "portions": [ + { + // first, we check for sandwich bread + // anything that matches the sandwich bread tag will get their values multiplied by 0.5 and added to the sandwich + "ingredient": { + "tag": "tfc:sandwich_bread" + }, + "nutrient_modifier": 0.5, + "saturation_modifier": 0.5, + "water_modifier": 0.5 + }, + { + // no ingredient is specified, so any food will match these + // however, the first portion already 'claimed' the sandwiches, so only the remaining ingredients are used. + "nutrient_modifier": 0.8, + "water_modifier": 0.8, + "saturation_modifier": 0.8 + } + ] +} +``` + +**This modifier is only usable in crafting recipes which support item stack providers.** + +
+ +## Add Bait to Rod + +This modifier takes as input a fishing rod, and searches elsewhere in the crafting grid for a bait type item, which is then attaches to the fishing rod as the result. It has the following fields: + +- `type`: `tfc:add_bait_to_rod` + +**This modifier is only usable in crafting recipes which support item stack providers.** + +
+ +## Add Heat + +This specifies that the provider should add a specific heat value. Note that adding a heat value where none was previously specified is the same as directly setting the heat. It has the following fields: + +- `type`: `tfc:add_heat` +- `temperature`: Integer. An amount in degrees Celsius to be added. + +
+ +## Add Trait + +This specifies that the provider should add a food trait to the item. It has the following fields: + +- `type`: `tfc:add_trait` +- `trait`: A [Food Trait](../common-types/#food-traits) to be added. + +
+ +## Copy Food + +This specifies that the provider should copy the food properties (expiration date, food traits) from the input stack. It has the following fields: + +- `type`: `tfc:copy_food` + +
+ +## Copy Oldest Food + +In a crafting recipe, this specifies that the provider should copy the food properties (expiration date, food traits) from the item that is the closest to expiration. It has the following fields: + +- `type`: `tfc:copy_oldest_food` + +**This modifier is only usable in crafting recipes which support item stack providers.** + +
+ +## Copy Forging Bonus + +This specifies that the provider should copy the Forging bonus, which is recorded as a NBT tag on the stack, from the input stack. It has the following fields: + +- `type`: `tfc:copy_forging_bonus` + +
+ +## Copy Heat + +This specifies that the provider should copy the current heat from the input stack. It has the following fields: + +- `type`: `tfc:copy_heat` + +
+ +## Copy Input + +This specifies that the provider should copy the input to the recipe, and ignore the `stack` parameter. The stack defined as the "input" stack will be different depending on the recipe the provider is used in. It has the following fields: + +- `type`: `tfc:copy_input` + +
+ +## Empty Bowl + +This specifies that the output item should be the empty bowl of the input. This is supported for soup items, which return the bowl they were created with. It has the following fields: + +- `type`: `tfc:empty_bowl` + +
+ +## Remove Trait + +This specifies that the provider should remove a food trait from the item. It has the following fields: + +- `type`: `tfc:remove_trait` +- `trait`: A [Food Trait](../common-types/#food-traits) to be removed. + +
+ +## Reset Food + +This specifies that the provider should set the output item to be created at the current time. This might be necessary for recipes that produce item stack outputs that might rot over time. It has the following fields: + +- `type`: `tfc:reset_food` + +
+ +## Sandwich + +This modifier constructs a sandwich using the input ingredients present in the recipe. + +- `type`: `tfc:sandwich` + +**This modifier is only usable in crafting recipes which support item stack providers.** + +
+ +## Add Glass + +This modifier is used as part of [Glassworking](../recipes/#glassworking) recipes. This modifier attaches a glass batch to the output item's nbt from the input item. + +- `type`: `tfc:add_glass` + +
+ +## Add Powder + +This modifier is used as part of [Glassworking](../recipes/#glassworking) recipes. It performs the glass operation for the given powder. + +- `type`: `tfc:add_powder` + +**This modifier is only usable in crafting recipes which support item stack providers.** + +
diff --git a/1.20.x/data/recipes-pot.md b/1.20.x/data/recipes-pot.md new file mode 100644 index 0000000..64bf675 --- /dev/null +++ b/1.20.x/data/recipes-pot.md @@ -0,0 +1,163 @@ +--- +layout: page +title: "Firepit Pot Recipes" +permalink: /1.20.x/data/recipes-pot/ +--- + +# Firepit Pot Recipes + +Pot recipes are recipe types which use the ceramic pot, when placed on a firepit. All pot recipes operate in a similar fashion, where a fluid and ingredients must be added, followed by some amount of time spent boiling in which the ingredients can not be removed, and then outputs will be produced. The pot may have output which can be extracted by interacting with the pot, depending on the type of the recipe. + +**Note**: the pot can contain up to 1000 mB in the internal tank, and has five slots for ingredients which are restricted to a stack size of one. + +TFC adds two types of pot recipe: + + + +- [Jam Pot](#jam-pot) +- [Simple Pot](#simple-pot) +- [Soup Pot](#soup-pot) + + + +
+ +## Jam Pot + +Jam pot recipes produce a special output that can be interacted with in the pot. When clicking with an empty jar with lid, items are extracted from the output and given to the player, typically jars of jam. It ahas the following properties: + +- `type`: `tfc:pot_jam` +- `ingredients`: An array of [Ingredients](../ingredients/) that the recipe consumes. Should not be more than five, otherwise the recipe will be impossible. +- `fluid_ingredient`: A [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients) that the recipe requires. +- `duration`: An integer. The number of ticks that the pot must boil for. +- `temperature`: An number. The minimum temperature in degrees Celsius that the pot must be above to start "boiling". +- `item`: The item given to the player when the pot is clicked with an empty jar. Typically a jar of jam. +- `texture`: A texture location that is rendered in the pot when it is complete and still has output. + +#### Example +```jsonc +// References: data/tfc/recipes/pot/jam_banana_2 +{ + "type": "tfc:pot_jam", + "ingredients": [ + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/banana" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/banana" + } + }, + { + "tag": "tfc:sweetener" + } + ], + "fluid_ingredient": { + "ingredient": "minecraft:water", + "amount": 100 + }, + "duration": 500, + "temperature": 300, + "result": { + "item": "tfc:jar/banana", + "count": 2 + }, + "texture": "tfc:block/jar/banana" +} +``` + +## Simple Pot + +Fluid pot recipes produce an output fluid directly in the pot. It has the following properties: + +- `type`: `tfc:pot` +- `ingredients`: An array of [Ingredients](../ingredients/) that the recipe consumes. Should not be more than five, otherwise the recipe will be impossible. +- `fluid_ingredient`: A [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients) that the recipe requires. +- `duration`: An integer. The number of ticks that the pot must boil for. +- `temperature`: An number. The minimum temperature in degrees Celsius that the pot must be above to start "boiling". +- `fluid_output`: A [Fluid Stack](../common-types/#fluid-stack) that the pot produces upon completion. +- `item_output`: An array of up to 5 [Item Stacks](../common-types/#item-stacks) indicating what items should be left in the pot + +#### Example + +```jsonc +// Reference: data/tfc/recipes/pot/cooked_rice_2.json +{ + "type": "tfc:pot", + "ingredients": [ + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/rice_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/rice_grain" + } + } + ], + "fluid_ingredient": { + "ingredient": "minecraft:water", + "amount": 100 + }, + "duration": 1000, + "temperature": 300, + "item_output": [ + { + "item": "tfc:food/cooked_rice" + }, + { + "item": "tfc:food/cooked_rice" + } + ] +} +``` + +
+ +## Soup Pot + +Soup pot recipes are used in making soups. When the soup is complete, it will remain in the pot as a special output type, and will have to be right clicked between one and three times with a bowl to extract soup. The type of soup and stats of the soup will be dependent on the input items' food properties. It has the following properties: + +- `type`: `tfc:soup_pot` +- `ingredients`: An array of [Ingredients](../ingredients/) that the recipe consumes. Should not be more than five, otherwise the recipe will be impossible. +- `fluid_ingredient`: A [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients) that the recipe requires. +- `duration`: An integer. The number of ticks that the pot must boil for. +- `temperature`: An number. The minimum temperature in degrees Celsius that the pot must be above to start "boiling". + +#### Example + +```jsonc +// Reference: data/tfc/recipes/pot/soup_3.json +{ + "type": "tfc:pot_soup", + "ingredients": [{ + "type": "tfc:not_rotten", + "ingredient": { + "tag": "tfc:foods/usable_in_soup" + } + }, { + "type": "tfc:not_rotten", + "ingredient": { + "tag": "tfc:foods/usable_in_soup" + } + }, { + "type": "tfc:not_rotten", + "ingredient": { + "tag": "tfc:foods/usable_in_soup" + } + }], + "fluid_ingredient": { + "ingredient": "minecraft:water", + "amount": 1000 + }, + "duration": 1000, + "temperature": 300 +} +``` diff --git a/1.20.x/data/recipes.md b/1.20.x/data/recipes.md new file mode 100644 index 0000000..5a0ec5f --- /dev/null +++ b/1.20.x/data/recipes.md @@ -0,0 +1,632 @@ +--- +layout: page +title: "Recipes" +permalink: /1.20.x/data/recipes/ +--- + +# Recipe Types + +Recipes can be configured through [datapacks](https://minecraft.wiki/w/Recipe). TFC adds a number of recipe types for its custom crafting operations, and they can be used to add, remove, or modify existing recipes. A complete reference of all of TFC's defined recipes, organized into folders depending on their type can be found in the [TFC Github](https://github.com/TerraFirmaCraft/TerraFirmaCraft/tree/1.20.x/src/main/resources/data/tfc/recipes). + +TFC adds the following recipe types: + + + +- [Alloy](#alloy) +- [Anvil Welding](#anvil-welding) +- [Anvil Working](#anvil-working) +- [Barrel Instant Fluid](#barrel-instant-fluid) +- [Barrel Instant](#barrel-instant) +- [Barrel Sealed](#barrel-sealed) +- [Blast Furnace](#blast-furnace) +- [Bloomery](#bloomery) +- [Casting](#casting) +- [Chiseling](#chiseling) +- [Collapse](#collapse) +- [Glassworking](#glassworking) +- [Heating](#heating) +- [Knapping](#knapping) +- [Landslide](#landslide) +- [Loom](#loom) +- [Pot](../recipes-pot/) +- [Quern](#quern) +- [Rock Knapping](#rock-knapping) +- [Scraping](#scraping) + + + +
+ +## Alloy + +Alloy recipes are used in the creation of alloys in small vessels and crucibles. They contain a list of percentages of each other metal which must be satisfied. + +**Note:** Only one alloy recipe should be defined for a given output metal. While this is not *required*, some things may not work correctly. + +- `type`: `tfc:alloy` +- `result`: A string, representing the registry name of a [Metal](../custom/#metals). +- `contents`: An array of objects, each containing the following properties: + - `metal`: (String) The registry name of the required [Metal](../custom/#metals). + - `min`: The minimum proportion needed in the mixture, in the range [0, 1]. + - `max`: The maximum proportion needed, larger than `min` and in the range [0, 1]. + +#### Example + +```json +{ + "type": "tfc:alloy", + "result": "tfc:bismuth_bronze", + "contents": [ + { + "metal": "tfc:copper", + "min": 0.2, + "max": 0.3 + }, + { + "metal": "cool_addon:another_metal", + "min": 0.5, + "max": 0.65 + } + ] +} +``` + +
+ +## Anvil Welding + +Welding recipes are used to join two items into one. A welding is performed by placing both items in the anvil, plus a single flux, and then shift right clicking the anvil with a hammer. Welding recipes in TFC all require the temperature of the item to be hot enough, however welding recipes do not in general require the item to be heated - only if the item's item temperature defines a `welding_temperature` that is nonzero. Welding recipes have the following properties: + +- `type`: `tfc:welding` +- `first_input` and `second_input` are [Ingredients](../ingredients/). They represent both inputs to the recipe. They are not ordered, and so if the two ingredients are different, the recipe will be compared in both orientations to the input items. +- `tier`: An optional integer (Default: -1). The tier of the anvil used must be equal to or greater than the tier of the recipe. +- `result`: An [Item Stack Provider](../common-types/#item-stack-providers) which represents the output of the recipe. Note that the heat of **both** inputs (whichever is higher) is automatically copied to the output. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/welding/bismuth_bronze_double_ingot.json +{ + "type": "tfc:welding", + "first_input": { + "item": "tfc:metal/ingot/bismuth_bronze" + }, + "second_input": { + "item": "tfc:metal/ingot/bismuth_bronze" + }, + "tier": 1, // Tier 1 = Available on copper anvils and above. + "result": { + "item": "tfc:metal/double_ingot/bismuth_bronze" + } +} +``` + +
+ +## Anvil Working + +Working recipes are used to transform one item into another via the anvil working minigame. Working is performed by placing the item in the anvil, and then using rules to move the pointer until it lines up with the target, and a list of requirements are satisfied by the most recent three rules that were performed. + +Rules all follow a specific naming scheme: `[step]_[order]`. + +- `[step]` is a type of step that must be performed. It must be one of `hit`, `draw`, `punch`, `bend`, `upset`, `shrink`. +- `[order]` is the order in which the step must be performed, for the rule to be satisfied. It must be one of `any`, `last`, `not_last`, `second_last`, `third_last`. + +According to that naming scheme, some valid rules are `hit_last`, `draw_not_last`, `upset_second_last`, or `shrink_any`. + +Anvil recipes also can define forging bonuses for certain outputs. The forging bonus is calculated based on the total number of steps used to work the item, and compared to the optimal number of steps possible for that item. The bonus is then compared to a series of thresholds: 1.5x, 2.0x, 5.0x, 10.0x, and a bonus is applied. Forging bonuses consist of the NBT tag `{"tfc:forging_bonus":}`, where `value` is an integer between [1, 4], where a higher number indicates a higher bonus. Tools that have the forging bonus tag have two additional hidden effects, akin to the Unbreaking and Efficiency enchantments in vanilla Minecraft, with their effectiveness based on the higher bonus. + +Anvil recipes have the following properties: + +- `type`: `tfc:anvil` +- `input`: An [Ingredient](../ingredients/), of the input item. Note that Anvil recipes can have multiple recipes with the same ingredient, and will be selected when the plan is selected for that item. +- `result`: An [Item Stack Provider](../common-types/#item-stack-providers) which represents the output of the recipe. Note that the heat of the input is automatically copied to the output. +- `tier`: An optional integer (Default: -1). The tier of the anvil used must be equal to or greater than the tier of the recipe. +- `rules`: An array of rules. Must have one, two, or three rules. Each rule must be a string following the naming scheme above. +- `apply_forging_bonus`: An optional boolean (Default: `false`). If true, this anvil recipe will automatically apply a forging bonus to the item stack. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/anvil/bronze_pickaxe_head.json +{ + "type": "tfc:anvil", + "input": { + "item": "tfc:metal/ingot/bronze" + }, + "result": { + "item": "tfc:metal/pickaxe_head/bronze" + }, + "tier": 2, + "rules": [ + "punch_last", + "bend_not_last", + "draw_not_last" + ], + "apply_forging_bonus": true +} +``` + +
+ +## Barrel Instant Fluid + +This is a variant of an instant barrel recipe which involves two fluid inputs. The primary fluid must be in the barrel's liquid tank, and the added fluid must be present in a fluid container item (such as a bucket), and can be added in the item input slot, **or** by placing the item in the fluid input slot. Like a instant barrel recipe, there must be enough fluid in the input item, to fully consume the fluid in the barrel. + +Like [Sealed Barrel](#barrel-sealed) recipes, these are declared in their lowest common ratio form, and any multiple of this recipe is able to complete at once. + +- `type`: `tfc:barrel_instant_fluid` +- `primary_fluid`: A [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients), representing the input fluid in the barrel. +- `added_fluid`: A [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients), representing the fluid that must be added via a fluid container. +- `output_fluid`: A [Fluid Stack](../common-types/#fluid-stack), representing the output fluid. +- `sound`: A string, representing the registry name of a sound event, which is played when the recipe finishes. Defaults to `minecraft:block.brewing_stand.brew`. + +#### Example + +```jsonc +// Reference: /data/tfc/recipes/barrel/brine.json +{ + "type": "tfc:barrel_instant_fluid", + "primary_fluid": { + "ingredient": "tfc:salt_water", + "amount": 9 + }, + "added_fluid": { + "ingredient": "tfc:vinegar", + "amount": 1 + }, + "output_fluid": { + "fluid": "tfc:brine", + "amount": 10 + } +} +``` + +
+ +## Barrel Instant + +An instant barrel recipe is one which takes effect immediately when putting items in a barrel. It can have fluid or item ingredients, and fluid or item outputs, however if it has both fluid and item ingredients, and a fluid output, then the recipe will only activate if there is enough input items to *fully consume* the input fluid. + +Like [Sealed Barrel](#barrel-sealed) recipes, these are declared in their lowest common ratio form, and any multiple of this recipe is able to complete at once. + +**Note**: A barrel recipe must have *at least* one of `input_item` or `input_fluid`. + +- `type`: `tfc:barrel_instant` +- `input_item`: An optional [Item Stack Ingredient](../common-types/#item-stack-ingredients), representing the input item. Defaults to empty. +- `input_fluid`: A optional [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients), representing the input fluid. Defaults to empty. +- `output_item`: An optional [Item Stack Provider](../common-types/#item-stack-providers), representing the output item. Defaults to empty. +- `output_fluid`: A [Fluid Stack](../common-types/#fluid-stack), representing the output fluid. Defaults to empty. +- `sound`: A string, representing the registry name of a sound event, which is played when the recipe finishes. Defaults to `minecraft:block.brewing_stand.brew`. + +#### Example + +```jsonc +// Reference: /data/tfc/recipes/barrel/limewater.json +{ + "type": "tfc:barrel_instant", + "input_item": { + "ingredient": { + "item": "tfc:powder/flux" + } + }, + "input_fluid": { + "ingredient": "minecraft:water", + "amount": 500 + }, + "output_fluid": { + "fluid": "tfc:limewater", + "amount": 500 + } +} +``` + +
+ +## Barrel Sealed + +A sealed barrel recipe is one which requires the barrel to be sealed for a duration of time. The recipe will begin counting time when the barrel is first sealed, and will only complete if the barrel has been consecutively sealed for the required duration (unsealing and re-sealing will interrupt the recipe's progress). + +These recipes are declared in their least common ratio form, and the highest multiple of this recipe that is able to be completed, will be. However unlike [Instant Barrel](#barrel-instant) recipes, this recipe **will** void excess fluids, and items, if the ratio does not match the required ratio of the recipe. + +**Note**: A barrel recipe must have *at least* one of `input_item` or `input_fluid`. + +- `type`: `tfc:barrel_instant` +- `input_item`: An optional [Item Stack Ingredient](../common-types/#item-stack-ingredients), representing the input item. Defaults to empty. +- `input_fluid`: A optional [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients), representing the input fluid. Defaults to empty. +- `output_item`: An optional [Item Stack Provider](../common-types/#item-stack-providers), representing the output item. Defaults to empty. +- `output_fluid`: A [Fluid Stack](../common-types/#fluid-stack), representing the output fluid. Defaults to empty. +- `sound`: A string, representing the registry name of a sound event, which is played when the recipe finishes. Defaults to `minecraft:block.brewing_stand.brew`. +- `duration`: An Integer, representing a number of ticks that this barrel must be sealed for. A duration of `-1` will render this barrel recipe to be considered **infinite**, meaning it will never complete. Infinite barrel recipes of this form should define either `on_seal` or `on_unseal`. +- `on_seal`: An optional [Item Stack Provider](../common-types/#item-stack-providers) which will be applied whenever this barrel is sealed. This can be used to apply special effects to the item in the barrel while sealed. +- `on_unseal`: An optional [Item Stack Provider](../common-types/#item-stack-providers) which will be applied whenever this barrel is unsealed. This can be used to remove special effects on the item in the barrel when no longer sealed. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/barrel/large_prepared_hide.json +{ + "type": "tfc:barrel_sealed", + "input_item": { + "ingredient": { + "item": "tfc:large_scraped_hide" + } + }, + "input_fluid": { + "ingredient": "minecraft:water", + "amount": 500 + }, + "output_item": { + "item": "tfc:large_prepared_hide" + }, + "duration": 8000 +} +``` + +## Blast Furnace + +The blast furnace recipe is used to determine the input and output of a blast furnace. A fluid combined with a catalyst is combined to produce a new fluid. + +Blast furnace recipes have the following properties: +- `type`: `tfc:blast_furnace` +- `fluid`: A [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients) for the input fluid. +- `catalyst`: An [Ingredient](../ingredients/) specifying the catalyst item. +- `result`: A [Fluid Stack](../common-types/#fluid-stack) of the output fluid. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/blast_furnace/pig_iron +{ + "type": "tfc:blast_furnace", + "fluid": { + "ingredient": "tfc:metal/cast_iron", + "amount": 1 + }, + "result": { + "fluid": "tfc:metal/pig_iron", + "amount": 1 + }, + "catalyst": { + "tag": "tfc:flux" + } +} +``` + +
+ +## Bloomery + +The bloomery follows the following procedure: + +1. It consumes two types of input items: primary inputs, and catalysts. These must be consumed in an 1:1 ratio, and the bloomery has a maximum number of items that it can hold. +2. All primary inputs are converted into metal fluid, by finding a matching [Heating Recipe](#heating) for the item. +3. The total output fluid is divided by the input fluid amount - any excess is lost - and then one output item is produced for each full fluid input. (So a 100mB requiring recipe, when given 350 mB of fluid, would produce 3 items) +4. These items are then embedded in the "bloom" block, which can be mined multiple times to obtain the items. + +A bloomery recipe has the following properties: + +- `type`: `tfc:bloomery` +- `fluid`: A [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients). The fluid that primary inputs must be able to melt into, to be considered primary inputs. +- `catalyst`: An [Ingredient](../ingredients/). The ingredient which catalysts must match. +- `result`: A [Item Stack](../common-types/#item-stacks). The result item stack. +- `duration`: An integer, representing the duration in ticks until the bloomery is complete. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/bloomery/raw_iron_bloom.json +{ + "type": "tfc:bloomery", + "result": { + "item": "tfc:raw_iron_bloom" + }, + "fluid": { + "ingredient": "tfc:metal/cast_iron", + "amount": 100 + }, + "catalyst": { + "item": "minecraft:charcoal" + }, + "duration": 15000 +} +``` + +
+ +## Casting + +Casting recipes define recipes between filled, solidified molds, and their item counterpart. They are used in two situations: + +1. When right clicking on a mold item, the mold will look for a matching casting recipe in order to determine what to produce. +2. The [Casting Crafting Recipe](../crafting/#casting) will internally look for a matching casting recipe to determine the output. + +Casting recipes have the following properties: + +- `type`: `tfc:casting` +- `mold`: An [Ingredient](../ingredients/). This ingredient is used just to match the mold item itself, not the contents. +- `fluid`: A [Fluid Stack Ingredient](../common-types/#fluid-stack-ingredients). This ingredient is used to match the contents of the solidified mold. +- `result`: An [Item Stack](../common-types/#item-stacks). This is the output of the recipe. +- `break_chance`: A number between [0, 1]. This is the probability that the mold will break upon completion of this recipe, where a higher number indicates a higher probability. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/casting/bismuth_bronze_axe_head.json +{ + "type": "tfc:casting", + "mold": { + "item": "tfc:ceramic/axe_head_mold" + }, + "fluid": { + "ingredient": "tfc:metal/bismuth_bronze", + "amount": 100 + }, + "result": { + "item": "tfc:metal/axe_head/bismuth_bronze" + }, + "break_chance": 1 // A break chance of 1 indicates this recipe breaks the mold every time +} +``` + +
+ +## Chiseling + +Chiseling recipes define a transformation between blocks when clicked with a chisel. They are used in two situations: + +1. When hovering over a block with a chisel to display a preview of the chiseled block +2. When executing a use action with the chisel, to conduct the transformation. + +Chisel recipes have the following properties: +- `type`: `tfc:chisel` +- `ingredient`: A [Block Ingredient](../common-types/#block-ingredients) corresponding to the block to be transformed. +- `result`: A [Block State](../common-types/#block-state) that will be placed. +- `mode`: The chisel mode ['smooth', 'stair', 'slab'] that is required. +- `item_ingredient`: An optional [Ingredient](../ingredients/) specifying the chisel. Anything in this ingredient must be in the `tfc:chisels` [Item Tag](../tags/#item-tags) +- `extra_drop`: An optional [Item Stack Provider](../common-types/#item-stack-providers) specifying an item to be dropped on chisel completion. + + +#### Example +```jsonc +// Reference: data/tfc/recipes/chisel/slab/acacia_wood_slab +{ + "type": "tfc:chisel", + "ingredient": "tfc:wood/planks/acacia", + "result": "tfc:wood/planks/acacia_slab", + "mode": "slab", + "extra_drop": { + "item": "tfc:wood/planks/acacia_slab" + } +} +``` + +
+ +## Collapse + +A collapse recipe is used for block conversions when a *collapse* occurs, which happens in the following steps: + +1. A player mines a block which can *trigger* a collapse (defined by having the `tfc:can_trigger_collapse`) tag. +2. Within a random radius centered on the *trigger* block, blocks that are [unsupported](../custom/#supports) are checked. If one of those blocks can *start* a collapse (defined by having the `tfc:can_start_collapse` tag), a collapse will occur centered on the *start* position. +3. Once a collapse has *started*, within a random radius centered on the *start* position, blocks that can collapse (defined by having both a valid collapse recipe and having the `tfc:can_collapse`), may randomly collapse - apply the recipe and convert to falling blocks. + +Collapse recipes are responsible, i.e. from converting raw stone into cobblestone when a collapse occurs. + +**Note** The presence of a collapse recipe alone does not make a block able to collapse. It must also be added to the [Can Collapse](../tags/#block-tags) block tag. + +A collapse recipe has the following properties: + +- `type`: `tfc:collapse` +- `ingredient`: A [Block Ingredient](../common-types/#block-ingredients). The blocks that this recipe applies to. +- `copy_input`: An optional Boolean (Default: `false`). If `true`, the recipe should copy the input block, including properties, as the result, and the `state` property is ignored. +- `result`: A [Block State](../common-types/#block-state). The output state for this recipe. If `copy_input` is `true`, this is not required. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/collapse/andesite_spike.json +{ + "type": "tfc:collapse", + "ingredient": "tfc:rock/spike/andesite", + "copy_input": true, + // Note that no 'result' field is required, as 'copy_input' is true. +} +``` + +
+ +## Glassworking + +A glassworking recipe is a flexible recipe type that represents a series of *operations* that are performed, most typically on a blowpipe item. When a blowpipe's list of steps on the tooltip matches a recipe, the glass batch is removed from the blowpipe and the result item spawns or is given to the player. + +The following operations are possible: `blow`, `roll`, `stretch`, `pinch`, `flatten`, `saw`, `table_pour`, `basin_pour`, `amethyst`, `soda_ash`, `sulfur`, `iron`, `ruby`, `lapis_lazuli`, `pyrite`, `sapphire`, `gold`, `graphite`, `copper`, `nickel`, `tin`, `silver`, `table_pour`, `basin_pour` + +A glassworking recipe has the following properties: + +- `type`: `tfc:glassworking` +- `operations`: An array of string identifiers for operations, from the list above. +- `batch`: An [Ingredient](../ingredients/) representing the required item that must be attached to the blowpipe. The item should have the `tfc:glass_batches` item tag in order to be able to be added to the blowpipe. +- `result`: An [Item Stack](../common-types/#item-stacks) representing the item result of the recipe. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/glassworking/lens.json +{ + "type": "tfc:glassworking", + "operations": [ + "blow", + "stretch", + "roll", + "saw" + ], + "batch": { + "item": "tfc:silica_glass_batch" + }, + "result": { + "item": "tfc:lens" + } +} +``` + +
+ +## Heating + +A heating recipe is used by any device which heats items, such as a firepit, charcoal forge, small vessel, bloomery, or blast furnace. They define what an item transforms into once heated: either converting into another item (such as cooking food), or melting into a liquid (such as melting ores). Note that this **does not make the item heatable**. Any item used in a heating recipe also needs a [Item Heat](../custom/#item-heats) added for it. + +A heating recipe has the following properties: + +- `type`: `tfc:heating` +- `ingredient`: An [Ingredient](../ingredients/). This defines what items the heating recipe applies to. +- `result_item`: An optional [Item Stack Provider](../common-types/#item-stack-providers) (Default: empty). This defines what item the heating recipe may convert to. Note that the "copy heat" functionality of an item stack provider is implicit and always applied when using heating recipes. +- `result_fluid`: An optional [Fluid Stack](../common-types/#fluid-stack) (Default: empty). This defines what fluids the heating recipe may create. +- `temperature`: A number, which is the [Temperature](../common-types/#temperature) above which this item will convert to it's outputs. + +**Note**: A heating recipe may define one, both, or neither of `result_item` and `result_fluid`, depending on what is desired. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/heating/ore/normal_bismuthinite.json +// This recipe allows normal bismuthinite ore to melt into 25 mB of molten bismuth at 270 C +{ + "type": "tfc:heating", + "ingredient": { + "item": "tfc:ore/normal_bismuthinite" + }, + "result_fluid": { + "fluid": "tfc:metal/bismuth", + "amount": 25 + }, + "temperature": 270 +} +``` + +
+ +## Knapping + +Knapping recipes include all types of knapping. The properties of the knapping recipe are defined by [Knapping Types](../custom/#knapping-types). They define patterns that can be used in the knapping grid. Note that knapping patterns are not automatically rotated or mirrored, and each desired rotation or mirror of a given pattern must be added explicitly. It has the following properties: + +- `type`: `tfc:knapping` +- `knapping_type`: An id of a [Knapping Type](../custom/#knapping-types). +- `result`: An [Item Stack](../common-types/#item-stacks). The output of the recipe. +- `ingredient`: An optional [Ingredient] that must match the item clicked. Used to restrict recipes beyond the ingredient in the knapping type, for example how some rock knapping recipes only work for certain rocks. If not provided, there is no restriction beyond that in the knapping type. +- `pattern`: The knapping pattern. Must be an array of strings representing the knapping grid. It can be up to 5 x 5. Spaces are counted as empty space, any other character is treated as a filled spot. +- `outside_slot_required`: Boolean. (Default: `true`) For knapping patterns that are smaller than 5 x 5, this defines if the slots outside that grid are required to be filled, or empty. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/clay_knapping/pickaxe_head_mold.json +{ + "type": "tfc:clay_knapping", + "outside_slot_required": true, + "pattern": [ + "XXXXX", + "X X", + " XXX ", + "XXXXX" + ], + "result": { + "item": "tfc:ceramic/unfired_pickaxe_head_mold" + } +} +``` + +
+ +## Landslide + +A landslide recipe is used for block conversions when a certain block *landslides*. A *landslide* is what occurs when a block update causes adjacent blocks to check if they are affected by gravity, and either fall directly downwards, or to adjacent blocks and downwards. It is responsible, i.e. from converting grass to dirt when landsliding. + +**Note** The presence of a landslide recipe alone does not make a block able to landslide. It must also be added to the [Can Landslide](../tags/#block-tags) block tag. + +A landslide recipe has the following properties: + +- `type`: `tfc:landslide` +- `ingredient`: A [Block Ingredient](../common-types/#block-ingredients). The blocks that this recipe applies to. +- `copy_input`: An optional Boolean (Default: `false`). If `true`, the recipe should copy the input block, including properties, as the result, and the `state` property is ignored. +- `result`: A [Block State](../common-types/#block-state). The output state for this recipe. If `copy_input` is `true`, this is not required. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/landslide/black_sand.json +{ + "type": "tfc:landslide", + "ingredient": "tfc:sand/black", + "result": "tfc:sand/black" +} +``` + +
+ +## Loom + +Loom recipes are used for producing items with a Loom. Note that loom recipes are unique to their input. This means that you can't have two loom recipes that have the same ingredient. Loom recipes have the following properties: + +- `type`: `tfc:loom` +- `ingredient`: An [Item Stack Ingredient](../common-types/#item-stack-ingredients). This is the input for the recipe. Note that this is an Item Stack Ingredient, which means it specifies the count of items required in the ingredient. It is typical for loom recipes to require more than one item. +- `result`: An [Item Stack Provider](../common-types/#item-stack-providers). The result produced by this recipe. +- `steps_required`: An integer, which determines how many steps of the loom's working animation need to be completed to produce one product item. +- `in_progress_texture`: The texture used in the loom rendering when this recipe is in progress. + +```jsonc +// Reference: data/tfc/recipes/loom/wool_block.json +{ + "type": "tfc:loom", + "ingredient": { + "ingredient": { + "item": "tfc:wool_cloth" + }, + "count": 4 + }, + "result": { + "item": "minecraft:white_wool", + "count": 8 + }, + "steps_required": 4, + "in_progress_texture": "minecraft:block/white_wool" +} +``` + +
+ +## Quern + +Quern recipes are used for grinding items in the Quern. The handstone slot is special and will accept any item with the tag `tfc:handstone` (See [Item Tags](../tags/#item-tags)). It has the following properties: + +- `type`: `tfc:quern` +- `ingredient`: An [Ingredient](../ingredients/). This is the input for the recipe. +- `result`: An [Item Stack](../common-types/#item-stacks). The output of the recipe. + +#### Example + +```jsonc +// Reference: data/tfc/recipes/quern/bone.json +{ + "type": "tfc:quern", + "ingredient": { + "item": "minecraft:bone" + }, + "result": { + "item": "minecraft:bone_meal", + "count": 3 + } +} +``` + +
+ +## Scraping + +Scraping recipes are used when any scrapable item - defined as having the `tfc:scrapable` [Item Tag](../tags/#item-tags) is placed on top of a valid scrapable surface - defined by having the `tfc:scraping_surface` [Block Tag](../tags/#block-tags) - and then each of 16 pixel regions are right clicked with a knife in order to transform the recipe from the input to the output. It has the following properties: + +- `type`: `tfc:scraping` +- `ingredient`: An [Ingredient](../ingredients/). This is the input for the recipe. +- `result`: An [Item Stack](../common-types/#item-stacks). The output of the recipe. +- `input_texture`: The identifier of the texture displayed on the block for the unfinished item. Must be an existing item/block texture or stitched to the atlas. +- `output_texture`: The identifier of the texture displayed on the block for the finished item. Must be an existing item/block texture or stitched to the atlas. diff --git a/1.20.x/data/tags.md b/1.20.x/data/tags.md new file mode 100644 index 0000000..e0727bb --- /dev/null +++ b/1.20.x/data/tags.md @@ -0,0 +1,155 @@ +--- +layout: page +title: "Tags" +permalink: /1.20.x/data/tags/ +--- + +# Tags + +This page details all the tags that TFC adds, and uses for various functions. These have been separated out into [Block Tags](#block-tags), [Fluid Tags](#fluid-tags), and [Item Tags](#item-tags). + +## Block Tags + +Tag Id | Function +---|--- +`tfc:can_trigger_collapse` | Blocks which when mined will search a nearby area for potential blocks that can **start** a collapse. +`tfc:can_start_collapse` | Blocks which can form the epicenter of a collapse. Without a start, a collapse cannot occur. +`tfc:can_collapse` | Blocks which, once a collapse has **started**, can collapse as part of the destruction. Must also have a valid [Collapse Recipe](../recipes/#collapse) defined for this block. +`tfc:can_landslide` | Blocks which can landslide to below or adjacent blocks, and are affected by gravity. Must also have a valid [Landslide Recipe](../recipes/#landslide) defined for this block. +`tfc:supports_landslide` | Blocks which are not full blocks, but count as full blocks when determining if an adjacent block might support a block against landsliding. Blocks cannot landslide when they are supported on at least two sides. +`tfc:toughness_1` | Blocks which are defined to have toughness 1 (Default for blocks without any tag is 0). Falling blocks are able to break non solid blocks with a equal or lesser toughness than the falling block. +`tfc:toughness_2` | Blocks which are defined to have toughness 2 (Default for blocks without any tag is 0). Falling blocks are able to break non solid blocks with a equal or lesser toughness than the falling block. +`tfc:toughness_3` | Blocks which are defined to have toughness 3 (Default for blocks without any tag is 0). Falling blocks are able to break non solid blocks with a equal or lesser toughness than the falling block. +`tfc:tree_grows_on` | Blocks which a tree is able to spawn on, during world generation. +`tfc:bush_plantable_on` | Blocks which many plants, including bushes, fruit trees, and seasonal plants are able to spawn on, during world generation. +`tfc:single_block_replaceable` | Single blocks which can be replaced during world generation by other features, such as single block plants or grasses. +`tfc:sea_bush_plantable_on` | Blocks which many underwater plants are able to spawn on, during world generation. +`tfc:creeping_plantable_on` | Blocks which creeping plants are able to spawn on, during world generation. +`tfc:thatch_bed_thatch` | Blocks which count as valid `thatch` blocks when trying to make a thatch bed. +`tfc:can_be_snow_piled` | Blocks which can be hidden by snow formation. Can include both single blocks and two-tall plant blocks. +`tfc:can_be_ice_piled` | Blocks which can be hidden by ice formation. Can include both blocks in the ice and immediately above (i.e. lily pads) +`tfc:breaks_when_isolated` | When surrounded on all sides by air blocks, this will pop off as an item upon being updated. +`tfc:lit_by_dropped_torch` | Blocks which, when a torch item entity is dropped on them, might start a fire atop them, +`tfc:charcoal_cover_whitelist` | Blocks that are automatically considered valid cover blocks by a charcoal pit. +`tfc:forge_insulation` | Blocks which serve as the five external insulation blocks of a forge. +`tfc:forge_invisible_whitelist` | Blocks that the forge will treat like air for the purposes of finding their chimney, for example crucibles +`tfc:bloomery_insulation` | Blocks that can be used in the bloomery`s main structure. +`tfc:blast_furnace_insulation` | Blocks that can be used in the blast furnace`s main structure. +`tfc:scraping_surface` | Blocks which can act as a flat surface for a [Scraping Recipe](../recipes/#scraping) to be performed on. +`tfc:can_carve` | Blocks that can be replaced by things like caves and ravines during world generation. +`tfc:logs_that_log` | Log blocks which can be felled as trees, using TFC`s tree chopping functionality. +`tfc:needs_stone_tool` | Blocks that need a stone tool to mine. +`tfc:needs_copper_tool` | Blocks that need a copper tool to mine. +`tfc:needs_bronze_tool` | Blocks that need a bronze tool to mine. +`tfc:needs_wrought_iron_tool` | Blocks that need a wrought iron tool to mine. +`tfc:needs_steel_tool` | Blocks that need a steel tool to mine. +`tfc:needs_black_steel_tool` | Blocks that need a black steel tool to mine. +`tfc:needs_colored_steel_tool` | Blocks that need a red or blue steel tool to mine. +`tfc:prospectable` | Blocks which can be found with the prospectors pick. When found, they will display a message with the translation key `.prospected`. +`tfc:converts_to_humus` | Blocks that, when covered in snow and melted in the spring, get replaced with a humus block. +`tfc:wild_crop_grows_on` | Blocks that wild crops can be placed or found on +`tfc:farmland` | Farmland blocks. Used in some checks for block placement. +`tfc:powder_snow_replaceable` | Blocks that can be replaced by patches of powder snow during worldgen. +`tfc:creates_upward_bubbles` | Blocks that create upward bubble columns above them when placed. Note that this tag alone is not enough to cause this functionality, this is only for pre-existing blocks. +`tfc:creates_downward_bubbles` | Blocks that create downward bubble columns. +`tfc:rabbit_raidable` | Blocks that rabbits will attempt to destroy +`tfc:fox_raidable` | Blocks that foxes will attempt to eat berries off of. This only applies to blocks that function like TFC berry bushes. + +
+ +## Fluid Tags + +Tag Id | Function +---|--- +`tfc:mixable` | Fluids that will mix together if they come in contact in the world. +`tfc:hydrating` | Fluids that hydrate farmland, berry bushes, and other growing things +`tfc:scribing_ink` | Fluids that can be used in the scribing table. +`tfc:usable_in_pot` | Fluids that can be in a firepit's pot +`tfc:usable_in_jug` | Fluids that can be in a jug +`tfc:usable_in_wooden_bucket` | Fluids that can be in a wooden bucket. +`tfc:usable_in_red_steel_bucket` | Fluids that can be in a red steel bucket. +`tfc:usable_in_blue_steel_bucket` | Fluids that can be in a blue steel bucket. +`tfc:usable_in_barrel` | Fluids that can be in a barrel. +`tfc:usable_in_sluice` | Fluids that can flow through a sluice. +`tfc:usable_in_ingot_mold` | Fluids that can be placed in a ingot mold. (In TFC, all molten metals) +`tfc:usable_in_tool_head_mold` | Fluids that can be placed in a tool head mold. (In TFC, only tool metals) + +
+ +## Item Tags + +Tag Id | Function +---|--- +`tfc:thatch_bed_hides` | Items which when right clicked on two `#tfc:thatch_bed_thatch` blocks, will form a thatch bed. +`tfc:firepit_kindling` | Items which are valid **kindling** for creating a Firepit with a fire starter. More kindling increases the chance of success. +`tfc:firepit_sticks` | Items which are valid **sticks** for creating a Firepit with a fire starter. A firepit requires three sticks to be created. +`tfc:firepit_logs` | Items which are valid **logs** for creating a Firepit with a fire starter. A firepit require one log, which will be immediately inserted as the first [Fuel](../custom/#fuels) item of the Firepit. +`tfc:starts_fires_with_durability` | Items which when right clicked, can start fires at the cost of durability like Flint and Steel. These items can then be used on most light-able TFC devices (firepit, forge, etc.). +`tfc:starts_fires_with_items` | Items which when right clicked, can start fires at the cost of the item itself like Fire Charges. These items can then be used on most light-able TFC devices (firepit, forge, etc.). +`tfc:extinguisher` | Items which can be used on a fire pit to put out the fire. +`tfc:log_pile_logs` | Items which are able to be placed into a log pile. +`tfc:pit_kiln_straw` | Items which are valid for the eight straw layers of a pit kiln. +`tfc:pit_kiln_logs` | Items which are valid for the eight log layers of a pit kiln. +`tfc:can_be_lit_on_torch` | Items which, when right clicked on a lit torch, can be lit into a torch themselves. +`tfc:firepit_fuel` | Items that are valid [Fuels](../custom/#fuels) for the Firepit. +`tfc:forge_fuel` | Items that are valid [Fuels](../custom/#fuels) for the Charcoal Forge. +`tfc:blast_furnace_fuel` | Items that are valid [Fuels](../custom/#fuels) for the Blast Furnace. +`tfc:handstone` | Items that are valid hand stones for a Quern. +`tfc:scrapable` | Items that can be placed flat on a block, with a valid [Scraping Recipe](../recipes/#scraping). +`tfc:knives` | Items that are knives +`tfc:hoes` | Items that are hoes +`tfc:hammers` | Items that are hammers +`tfc:chisels` | Items that are chisels. Required for chiseling functionality. +`tfc:flux` | Items that are usable as the catalyst ingredient for welding. +`tfc:tuyeres` | Items that can go in the Blast Furnace`s tuyere slot. +`tfc:rock_knapping` | Items that can be right clicked to knap, with a valid [Rock Knapping Recipe](../recipes/#rock-knapping). +`tfc:clay_knapping` | Items that can be right clicked to knap, with a valid [Clay Knapping Recipe](../recipes/#knapping). +`tfc:fire_clay_knapping` | Items that can be right clicked to knap, with a valid [Fire Clay Knapping Recipe](../recipes/#knapping). +`tfc:leather_knapping` | Items that can be right clicked to knap, with a valid [Leather Knapping Recipe](../recipes/#knapping). +`tfc:axes_that_log` | Tools that can be used to fell entire trees, via TFC`s tree chopping functionality. +`tfc:bush_cutting_tools` | Tools that can be right-clicked on berry bushes to get cuttings from them. +`tfc:compost_greens` | Items that are considered `green` items by the composter. +`tfc:compost_browns` | Items that are considered `brown` items by the composter. +`tfc:compost_poisons` | Items that poison compost, making it unusable. +`tfc:usable_on_tool_rack` | Tools that can be placed onto a tool rack. +`tfc:usable_in_powder_keg` | Items that are considered gunpowder for purposes of the powderkeg. +`tfc:soup_bowls` | Items that can be transformed into soup. Typically bowls. +`tfc:salad_bowls` | Items that can be clicked to make salad. +`tfc:usable_in_salad` | Items that are allowed in a salad. +`tfc:scribing_ink` | Items that are allowed in the ink slot of a scribing table. +`tfc:sandwich_bread` | Items that are considered bread for the purposes of sandwiches. These items are weighted slightly differently in the bread nutrition calculation and also have a specific place in the bread crafting recipe. +`tfc:small_fishing_bait` | Items that can be used as bait to catch small fish. +`tfc:large_fishing_bait` | Items that can be used as bait to catch large fish. +`tfc:holds_small_fishing_bait` | Fishing rods that can hold only small fishing bait. +`tfc:holds_large_fishing_bait` | Fishing rods that can hold small or large fishing bait. +`tfc:can_be_salted` | Items that can be crafted with salt. +`tfc:pileable_ingots` | Items that can be added to ingot piles. In order to add another item to an ingot pile, it must (1) be in this tag, (2) have a metal defined with the `ingot` field matching said item, and (3) likely needs a properly loaded [metal texture](../custom/#adding-textures). +`tfc:pileable_sheets` | Items that can be added to sheet piles. In order to add another item to an sheet pile, it must (1) be in this tag, (2) have a metal defined with the `sheet` field matching said item, and (3) likely needs a properly loaded [metal texture](../custom/#adding-textures). +`tfc:fox_spawns_with` | Items that a fox has a small chance of spawning with in its mouth. +`tfc:mob_feet_armor` | Armor that monsters can spawn with on their feet. +`tfc:mob_leg_armor` | Armor that monsters can spawn with on their legs. +`tfc:mob_chest_armor` | Armor that monsters can spawn with on their chest. +`tfc:mob_head_armor` | Armor that monsters can spawn with on their head. +`tfc:mob_mainhand_weapons` | Items that monsters can spawn with in their main hand. +`tfc:mob_offhand_weapons` | Items that monsters can spawn with in their off hand. +`tfc:deals_slashing_damage` | Weapons that deal slashing damage. +`tfc:deals_piercing_damage` | Weapons that deal piercing damage. +`tfc:deals_crushing_damage` | Weapons that deal crushing damage. + +
+ +## Entity Tags + +Tag Id | Function +---|--- +`tfc:turtle_friends` | Entities that turtles do not fear and will follow around curiously. +`tfc:spawns_on_cold_blocks` | Entities that can spawn on snow or ice. +`tfc:destroys_floating_plants` | Entities that destroy floating plants on contact. Essentially, boats. +`tfc:bubble_column_immune` | Entities which TFC bubble columns do not move +`tfc:needs_large_fishing_bait` | Entities that need large fishing bait to catch. +`tfc:hunts_land_prey` | Entities that are feared by land prey. Note that this tag does NOT add hunting functionality to an arbitrary entity. +`tfc:hunted_by_land_predators` | Entities that land predators will attempt to hunt. +`tfc:vanilla_monsters` | Monsters that are prevented from spawning on the surface. +`tfc:deals_slashing_damage` | Entities that deal slashing damage. +`tfc:deals_piercing_damage` | Entities that deal piercing damage. +`tfc:deals_crushing_damage` | Entities that deal crushing damage. diff --git a/1.20.x/index.md b/1.20.x/index.md new file mode 100644 index 0000000..52de484 --- /dev/null +++ b/1.20.x/index.md @@ -0,0 +1,19 @@ +--- +layout: page +title: 1.20.x +permalink: /1.20.x/ +--- + +# 1.20.x + +This is the documentation for the **3.x.x** version of TFC, currently for **Minecraft 1.20.1**. + +{% include alert.html type="info" title="Note" content="While working with datapacks, enabling enableDataPackTests in the TFC config will cause TFC to perform a number of validations to catch common mistakes and ensure your data is correct!" %} + +### [World Generation](worldgen/) + +All of TFC's world generation is available to be customized through vanilla data packs. There are many different pieces, so this will hopefully explain what TFC does, how it does it, and what you can safely modify. (And also, what can be extended with addons or compatibility mods.) + +### [Data](data/) + +TFC has a large number of crafting recipe types, other recipes, custom data, tags, and more which are also customizable via datapacks. This can be used to add or remove recipes from TFC devices, change or give things TFC-like behavior, or interact with other mods. diff --git a/1.20.x/worldgen/biomes.md b/1.20.x/worldgen/biomes.md new file mode 100644 index 0000000..f8ab6f1 --- /dev/null +++ b/1.20.x/worldgen/biomes.md @@ -0,0 +1,57 @@ +--- +layout: page +title: "Biomes" +permalink: /1.20.x/worldgen/biomes/ +--- + +# Biomes + +In TerraFirmaCraft, biomes determine the overall shape of the land, and the features that are generated. They **do not** determine the temperature, rainfall, or other climate related features. All of TFC's biomes, and their world generation JSON can be found [here](https://github.com/TerraFirmaCraft/TerraFirmaCraft/tree/1.20.x/src/main/resources/data/tfc/worldgen/biome). + +- Low Altitude Continental Biomes: + - `tfc:plains`, `tfc:hills`, `tfc:lowlands`, `tfc:low_canyons` +- Mid Altitude Continental Biomes: + - `tfc:rolling_hills`, `tfc:badlands`, `tfc:plateau`, `tfc:canyons`. +- High Altitude Continental Biomes: + - `tfc:mountains`, `tfc:old_mountains`, `tfc:oceanic_mountains`, `tfc:volcanic_mountains`, `tfc:volcanic_oceanic_mountains`. +- Oceanic Biomes: + - `tfc:ocean`, `tfc:ocean_reef`, `tfc:deep_ocean`, `tfc:deep_ocean_trench` +- Technical / Decoration Biomes: + - `tfc:shore` + - `tfc:lake`, `tfc:plateau_lake`, `tfc:mountain_lake`, `tfc:old_mountain_lake`, `tfc:oceanic_mountain_lake`, `tfc:volcanic_mountain_lake`, `tfc:volcanic_oceanic_mountain_lake`. + - `tfc:river`, `tfc:mountain_river`, `tfc:old_mountain_river`, `tfc:volcanic_mountain_river`, `tfc:oceanic_mountain_river`, `tfc:volcanic_oceanic_mountain_river`. + + +### Tags + +All of TFC's biomes use [Placed Feature Tags](../tags/#placed-feature-tags) in order to determine what features generate in a given stage. This means it is possible for addons or datapacks to add, remove, or modify specific features by editing these tags, without having to overwrite every single biome. Each TFC biome uses the following tags, where `` is replaced with the name of the biome in question: + +- `tfc:in_biome/erosion`, +- `tfc:in_biome/underground_lakes` or `tfc:in_biome/all_lakes` depending on the biome, +- `tfc:in_biome/soil_discs/`, +- `tfc:in_biome/underground_structures`, +- `tfc:in_biome/surface_structures`, +- `tfc:in_biome/strongholds`, +- `tfc:in_biome/veins`, +- `tfc:in_biome/underground_decoration`, +- `tfc:in_biome/large_features/`, +- `tfc:in_biome/surface_decoration/`, +- `tfc:in_biome/top_layer_modification` + +As you can see, apart from three steps, the biome tags used by TFC refer to the same features in every biome. + +**Note:** For addon developers, these **do not support `BiomeLoadingEvent` in Forge!**. + +### Properties + +TFC ignores several properties of biomes in favor of other methods. TFC redirects vanilla methods to call TFC-enhanced methods for functions such as temperature, rainfall, or sky color. These will only apply to biomes which have extensions registered (aka, TFC recognizes them). In these cases, other mods may still use these properties but within TFC and vanilla they will be ignored. + +- `temperature`, `temperature_modifier`, and `downfall` and `precipitation` are ignored in the default TFC overworld, or dimensions with custom TFC climate support. All TFC biomes should have `precipitation` set to `rain` or local weather might not work correctly. +- In `effects`, `fog_color`, `sky_color`, `water_color`, and `water_color` are ignored. They are instead queried based off a color map texture file (In `tfc:textures/colormap/*.png`), based off of the actual rainfall and temperature of an area. + +### Using Non-TFC Biomes in TFC + +In order to use non-TFC biomes in TFC, there are a couple requirements: + +- In order to use non-TFC biomes with a TFC biome source, the biomes must have a `BiomeExtension` registered. This object is responsible for integrating with the chunk generator, and includes noise generation and noise blending groups. +- If you want TFC biomes to be *generated* by the TFC biome source, this will very likely require custom hooks based on the sophistication of injections into the biome layer generation. Please consult us on discord with the nature of what you are attempting. diff --git a/1.20.x/worldgen/carvers.md b/1.20.x/worldgen/carvers.md new file mode 100644 index 0000000..3658127 --- /dev/null +++ b/1.20.x/worldgen/carvers.md @@ -0,0 +1,20 @@ +--- +layout: page +title: "Configured Carvers" +permalink: /1.20.x/worldgen/carvers/ +--- + +# Configured Carvers + +*[Vanilla Reference for Carvers](https://minecraft.gamepedia.com/Custom_world_generation#Carvers)* + +TFC adds two variants on vanilla carvers, which are modified to be able to both carve, and replace TFC rock blocks. These blocks are defined in the [dimension](../dimension/) settings. + +TFC adds the following carver types: + +**Carvers**: + +- TFC Cave (`tfc:cave`) +- TFC Canyon (`tfc:canyon`) + +Both these carvers have the exact same configuration as the vanilla carvers of the same name, and can be used in an interchangeable fashion. For examples of their configuration, see the above vanilla reference. \ No newline at end of file diff --git a/1.20.x/worldgen/common-types.md b/1.20.x/worldgen/common-types.md new file mode 100644 index 0000000..abff150 --- /dev/null +++ b/1.20.x/worldgen/common-types.md @@ -0,0 +1,200 @@ +--- +layout: page +title: "Common Types" +permalink: /1.20.x/worldgen/common-types/ +--- + +# Common Types + +There are a number of JSON types that are used in many different configurations for many different operations. These are all referenced here rather than repeating their definitions across every config they may belong to. + + + +- [Biome Category](#biome-category) +- [Biome Dictionary](#biome-dictionary) +- [Block Replacement Map](#block-replacement-map) +- [Forest Type](#forest-type) +- [Holder Set](#holder-set) +- [Key Value List](#key-value-list) +- [Lenient Blockstate](#lenient-blockstate) +- [Structure](#structure) +- [Vertical Anchor](#vertical-anchor) +- [Weighted List](#weighted-list) + + + +
+ +## Biome Category + +A biome category is the `category` field of a biome. Valid values are: + +- `none`, `tagia`, `extreme_hills`, `jungle`, `mesa`, `plains`, `savanna`, `icy`, `the_end`, `beach`, `forest`, `ocean`, `desert`, `river`, `swamp`, `mushroom`, `nether`, `underground` + +
+ +## Biome Dictionary + +A biome dictionary tag is a tag, all uppercase (like `WET`), which describes a property of a biome. They are added by Forge and other mods. + +
+ +## Block Replacement Map + +This defines a list of block -> block state replacements. For each block, it can be replaced with a random selection of blocks. + +It is a [Key Value List](#key-value-list), with the following key and value entries: + +- Key: `replace`: A block to be replaced. +- Value: `with`: A [Weighted List](#weighted-list) of objects, with the following value entry: + - Value: `block`: A [Lenient Blockstate](#lenient-blockstate). + +Example: + +```json +[ + { + "replace": "minecraft:stone", + "with": [ + { + "block": "minecraft:diamond_ore", + "weight": 2 + }, + { + "block": "minecraft:coal_ore", + "weight": 10 + } + ] + }, + { + "replace": "minecraft:dirt", + "with": [ + { + "block": "minecraft:grass" + } + ] + } +] +``` + +
+ +## Forest Type + +A forest type is a string, from the following values: + +- `none`, `sparse`, `edge`, `normal`, `old_growth` + +When compared, they compare relative to the above order. (So, `normal` is considered "greater than" `edge`, for example.) + +
+ +## Holder Set + +A Holder Set is a collection of elements of a given registry. For example, Configured Features, Placed Feature, or Biomes. + +1. A List of strings, where each entry is the name of a given registry entry. +2. A String, prefixed by `#`, indicating a [Tag](../tags/) + +
+ +## Key Value List + +This is a list that represents a map. It is a json array of objects, where each one has a key field, and a value field. There must be no duplicate key fields in the entire list. + +Note, the names `key` and `value` may be different depending on the actual list in question. + +Example: + +```json +[ + { + "key": "a key", + "value": 3 + }, + { + "key": "another key", + "value": 6 + } +] +``` + +
+ +## Lenient Blockstate + +This is a more lenient version of the vanilla block state requirement. It can *either* be: + +It is an object, with the following properties: + +- `Name`: The registry name of the block to use +- `Properties`: An object with a collection of key -> value pairs for each block state property. + +For example, the block state `minecraft:grass_block[snowy=false]` would become: + +```json +{ + "Name": "minecraft:grass_block", + "Properties": { + "snowy": "false", + } +} +``` + +Or, it can be a string with the registry name of the block to use. In this case, all block state properties will have their default values assigned, e.g. the above would be: + +```json +"minecraft:grass_block" +``` + +
+ +## Structure + +A structure is a reference to an NBT file. They can be created and loaded using [Structure Blocks](https://minecraft.wiki/w/Structure_Block). + +A structure file must have a file name such as `data//structures/.nbt`, which would then have the structure name `:`. + +#### Example + +The structure [`data/tfc/structures/acacia/1.nbt`](https://github.com/TerraFirmaCraft/TerraFirmaCraft/blob/1.18.x/src/main/resources/data/tfc/structures/acacia/1.nbt) is referenced as [`tfc:acacia/1`](https://github.com/TerraFirmaCraft/TerraFirmaCraft/blob/e89f6c553e8178346c83a1266829c61437f0c50c/src/main/resources/data/tfc/worldgen/configured_feature/tree/acacia.json#L6). + +
+ +## Vertical Anchor + +This represents a relative y height. It is an object with exactly one of the three following fields: + +- `absolute`: An integer representing an absolute y height. +- `above_bottom`: An integer representing a number of blocks above the lowest y level in the world. +- `below_top`: An integer representing a number of blocks below the highest y level in the world. + +Example (y = 63): +```json +{ + "absolute": 63 +} +``` + +
+ +## Weighted List + +A weighted list is similar to a [Key Value List](#key-value-list) in that it is a list of pairs, except in this list, each object has two fields, where one is a `weight` entry. The `weight` determines the relative weight of that element of the list, and can be any positive number. The other entry might be any other field depending on the actual list in question. + +The `weight` can also be omitted, in which case the entry will assume a default value of `1`. + +Example: + +```json +[ + { + "value": "minecraft:coal", + "weight": 1 + }, + { + "value": "minecraft:diamond", + "weight": 0.01 + } +] +``` \ No newline at end of file diff --git a/1.20.x/worldgen/decorators.md b/1.20.x/worldgen/decorators.md new file mode 100644 index 0000000..0d9924b --- /dev/null +++ b/1.20.x/worldgen/decorators.md @@ -0,0 +1,113 @@ +--- +layout: page +title: "Decorators" +permalink: /1.20.x/worldgen/decorators/ +--- + +# Decorators + +*[Vanilla Reference for Placement Modifiers / Decorators](https://minecraft.wiki/w/Custom_feature#Placed_feature)* + +Note that historically, Placement Modifiers / Placed Features were called Decorators, and TFC still refers to the two interchangeably. TFC adds the following placement modifier types, for use in placed features: + + + +- [Biome](#biome) +- [Carving Mask](#carving-mask) +- [Climate](#climate) +- [Flat Enough](#flat-enough) +- [Near Fluid](#near-fluid) +- [On Top](#on-top) +- [Shallow Water](#shallow-water) +- [Underground](#underground) +- [Volcano](#volcano) + + + +### Biome + +# TODO PORTING FIXME + +This is an extension of the vanilla `minecraft:biome_filter` decorator, but which respects the way TFC features are used in biomes (via tags). This exists to fix an unfortunate bug in [Forge](https://github.com/MinecraftForge/MinecraftForge/issues/8743) in 1.18. + +- Type: `tfc:biome` + +### Carving Mask + +This is an extension of the vanilla carving mask decorator, but with additional constraints on y level. It is used for large spikes to restrict them to a maximum y level. + +- Type: `tfc:carving_mask` +- Config: + - `min_y`: An optional [Vertical Anchor](../common-types/#vertical-anchor), the minimum allowed y value for this to spawn at. + - `max_y`: An optional [Vertical Anchor](../common-types/#vertical-anchor), the maximum allowed y value for this to spawn at. + - `probability`: A float in the range `[0, 1]`, the probability this will spawn at any given position. + - `step`: The carving stage to use. Must be either `air` or `liquid`. + +### Climate + +This decorator will conditionally place a feature based on specific climate properties. All config values are optional, and if omitted will allow all positions. This is used in clay deposits to restrict them based on minimum rainfall. + +The typical range for yearly average temperatures is -25 to +30 C. Rainfall values can vary between 0 mm and 500 mm. + +- Type: `tfc:climate` +- Config: + - `min_temperature` is an optional float representing the minimum allowed average yearly temperature. + - `max_temperature` is an optional float representing the maximum allowed average yearly temperature. + - `min_rainfall` is an optional float representing the minimum allowed rainfall. + - `max_rainfall` is an optional float representing the maximum allowed rainfall. + - `min_forest` is an optional [Forest Type](../common-types/#forest-type) representing the minimum required forest density. + - `max_forest` is an optional [Forest Type](../common-types/#forest-type) representing the maximum required forest density. + - `fuzzy` is an optional boolean (Default: `false`). If true, the temperature and rainfall requirements will be probabilistic relative to the center point, with maximum density at the exact center, and zero density at the edges. + + +### Flat Enough + +This decorator will check an area around the initial position for solid blocks. If it's not found, it will attempt to move lower down, until the max depth is reached (and then the position is thrown out), or enough solid blocks are found. This is used by TFC's boulders feature, and is why they can be set into the ground. + +- Type: `tfc:flat_enough` +- Config: + - `flatness` is an optional float (Default: `0.5`), in the range `[0, 1]`. It describes the how many solid blocks, as a percentage the surrounding area must contain. + - `radius` is an optional positive integer (Default: `2`), which is the radius around the initial position that the area is checked for solid blocks. + - `max_depth` is an optional positive integer (Default: `4`), which is how deep from the original position the decorator should try and search. + +### Near Fluid + +This decorator will conditionally place a feature if there is a given fluid within a `radius` in the x and z directions, and within `[-radius, 0]` in the y direction. + +- Type: `tfc:near_fluid` +- Config: + - `radius`: An integer representing the distance to search for water. + - `fluids`: An optional array of fluid ids that it will search for. If none are provided, any fluid will match (except air). + +### On Top + +This decorator checks the block below for a predicate, and passes if that predicate passes. + +- Type: `tfc:on_top` +- Config: + - `predicate`: A vanilla Block Predicate. + +### Shallow Water + +This decorator checks that the water is not too deep at a location. + +- Type: `tfc:shallow_water` +- Config: + - `max_depth`: An optional integer (Default: `5`), specifying the max depth of the water. + +### Underground + +This decorator passes if the position is below the world surface level. + +- Type: `tfc:underground` +- Config: None + +### Volcano + +This decorator places things near, or at, volcanoes. + +- Type: `tfc:volcano` +- Config: + - `center`: A boolean. If `true`, this decorator will ignore the `distance` argument and place the feature at the exact center of any volcanoes. + - `distance`: A float in the range `[0, 1]`, representing the distance from the center of a volcano that this position must be in order to generate. 1 is the maximum radius of the volcano. + \ No newline at end of file diff --git a/1.20.x/worldgen/dimension.md b/1.20.x/worldgen/dimension.md new file mode 100644 index 0000000..49e0dac --- /dev/null +++ b/1.20.x/worldgen/dimension.md @@ -0,0 +1,152 @@ +--- +layout: page +title: "Dimension" +permalink: /1.20.x/worldgen/dimension/ +--- + +In order to modify the `TerraFirmaCraft` world preset, it is necessary to override the vanilla overworld dimension (`data/minecraft/dimension/overworld.json`). The format of a dimension can be found [here](https://minecraft.wiki/w/Custom_dimension#Syntax_2). Included here is [an example](#example) of an override for the vanilla overworld, with TFC properties set to defaults. + +Configuration: + +- `type` is the namespaced ID of the [dimension type](https://minecraft.wiki/w/Custom_dimension#Dimension_type). The default is `minecraft:overworld`. +- `generator` is an object: + - `type` is the namespaced ID of the chunk generator. It must be `tfc:overworld`. + - `seed` is an optional `long` (Default: `0`). It is the seed of the world. + - `noise_settings` is the [noise settings](https://minecraft.wiki/w/Custom_noise) used in the chunk generator. The default is `minecraft:overworld`. + - `flat_bedrock` is a `boolean`. It controls if the bottom layer of bedrock in the world is flat. + - `biome_source` is an object: + - `type` is the namespaced ID of the biome source. It must be `tfc:overworld`. + - `tfc_settings` is an object: + - `seed` is an optional `long` (Default: `0`). It is the seed used for the biome source. + - `spawn_distance` is an integer. It is the farthest distance away from the spawn center location the player is allowed to spawn. + - `spawn_center_x` is an integer. It is the center x position that the player tries to spawn at. + - `spawn_center_z` is an integer. It is the center z position that the player tries to spawn at. + - `rock_layer_settings` is a [rock layer settings](#rock-layer-settings), which describes the rock layers of the world. + - `temperature_settings` is a [climate settings](#climate-settings), which describes the temperature settings of the world. + - `rainfall_settings` is a [climate settings](#climate-settings), which describes the rainfall settings of the world. + - `flat_bedrock` is a boolean (Default: `false`) that determines if bedrock is flat. + - `continentalness` is a float [`0`, `1`] (Default: `0.5`) that determines the share of land to water in the world. Higher values mean more land. + + +#### Example + +This is an example `overworld.json` override, with the default values used by TFC. + +File: `data/minecraft/dimension/overworld.json` +```json +{ + "type": "minecraft:overworld", + "generator": { + "type": "tfc:overworld", + "noise_settings": "minecraft:overworld", + "flat_bedrock": false, + "biome_source": { + "type": "tfc:overworld", + "spawn_distance": 8000, + "spawn_center_x": 0, + "spawn_center_z": 0, + "rock_layer_settings": { + "rock_layer_scale": 128, + "rocks": [ + "tfc:chalk", + "tfc:chert", + "tfc:claystone", + "tfc:conglomerate", + "tfc:dolomite", + "tfc:limestone", + "tfc:shale", + "tfc:gneiss", + "tfc:marble", + "tfc:phyllite", + "tfc:quartzite", + "tfc:schist", + "tfc:slate", + "tfc:diorite", + "tfc:gabbro", + "tfc:granite", + "tfc:andesite", + "tfc:basalt", + "tfc:dacite", + "tfc:rhyolite" + ] + }, + "temperature_settings": "tfc:default", + "rainfall_settings": "tfc:default" + } + }, + "forge:use_server_seed": true +} +``` + +### Rock Layer Settings + +This describes the rocks, and rock layers, as used during world generation. It must be an object, with the following fields. + +Configuration: + +- `rock_layer_scale` is an positive integer. It is a multiplier on how far apart rock regions are, in blocks. It must be a power of two. The default is 128. +- `rocks` is an array of rock presets, or rock definitions. Rock presets are rocks that are provided via TFC, or addons, and consist of the id name of the rock (i.e. `tfc:basalt`). Rock definitions are an object, which consist of a custom defined rock, by stating what blocks should be used for various rock states. A rock definition must have the following fields: + - `id` is the namespaced ID of the rock. + - `raw` is the block ID of the rock's raw block. + - `hardened` is the block ID of the rock's hardened block. + - `gravel` is the block ID of the rock's gravel block. + - `cobble` is the block ID of the rock's cobblestone block. + - `sand` is the block ID of the rock's sand block. + - `sandstone` is the block ID of the rock's sandstone block. + - `spike` is an optional block ID of the rock's spike block. This must be a TFC-like rock spike block. + - `loose` is an optional block ID of the rock's loose rock block. This must be a TFC-like loose rock block. + - `top_layer` is a boolean. If true, this rock will generate in the top rock layer. + - `middle_layer` is a boolean. If true, this rock will generate in the middle rock layer. + - `bottom_layer` is a boolean. If true, this rock will generate in the bottom rock layer. + +#### Presets + +TFC adds the following rock presets, which can be used in the above `rocks` array: + +- `tfc:chalk`, `tfc:chert`, `tfc:claystone`, `tfc:conglomerate`, `tfc:dolomite`, `tfc:limestone`, `tfc:shale`, `tfc:gneiss`, `tfc:marble`, `tfc:phyllite`, `tfc:quartzite`, `tfc:schist`, `tfc:slate`, `tfc:diorite`, `tfc:gabbro`, `tfc:granite`, `tfc:andesite`, `tfc:basalt`, `tfc:dacite`, `tfc:rhyolite` + +#### Example + +This is an example rock settings, which can be used instead of a preset string: + +```json +{ + "id": "basalt", + "raw": "tfc:rock/raw/basalt", + "hardened": "tfc:rock/hardened/basalt", + "gravel": "tfc:rock/gravel/basalt", + "cobble": "tfc:rock/cobble/basalt", + "sand": "tfc:sand/red", + "sandstone": "tfc:raw_sandstone/red", + "top_layer": true, + "middle_layer": true, + "bottom_layer": false +} +``` + +### Climate Settings + +This ia an object which controls various climate related parameters about the world, either as rainfall, or temperature. The climate settings defines the base climate generation of the world. This includes the climate scale (how far apart 'peaks' are, i.e. for lines of latitude), and if the climate model should by cyclical (with repeating peaks of max and min areas), or endless (with a moderate equator and 'infinite' peaks). + +It can be either a climate preset or a custom climate settings definition. A climate preset consists of the string climate settings preset identifier, as provided by TFC or addons. A climate settings definition consists of an object with the following parameters. + +Configuration: + +- `scale` is an integer, which represents how far apart peaks are. +- `endless_poles` is a boolean, which when true, will cause the peak regions to be endless rather than cyclical. + +#### Presets + +In addition to the above object, the string `tfc:default` can be used anywhere a climate settings is needed, which uses the below default values. + + +#### Example + +This is a climate settings, using the same values as `tfc:default`: + +```json +{ + "scale": 20000, + "endless_poles": false +} +``` diff --git a/1.20.x/worldgen/features/index.md b/1.20.x/worldgen/features/index.md new file mode 100644 index 0000000..367e20a --- /dev/null +++ b/1.20.x/worldgen/features/index.md @@ -0,0 +1,410 @@ +--- +layout: page +title: "Features" +permalink: /1.20.x/worldgen/features/ +--- + +# Features + +*[Vanilla Reference for Features](https://minecraft..com/wiki/Custom_feature)* + +Features are small decorations that modify individual chunks, based on the biome present in that chunk. In TFC, features are all added to biomes via the use of [Biome Tags](../tags/#biome-tags), which means that they can also be added to biomes via the use of these tags. + +TFC adds the following features: + +- **[Trees and Forests](trees/)** +- **[Ore Veins](veins/)** +- Caves: + - [Cave Spike](#cave-spike) + - [Large Cave Spike](#large-cave-spike) + - [Thin Spike](#thin-spike) + - [Cave Vegetation](#cave-vegetation) + - [Ice Cave](#ice-cave) + - [Geode](#geode) +- Fluids: + - [Rivulet](#rivulet) + - [Fissure](#fissure) + - [Hot Spring](#hot-spring) + - [Flood Fill Lake](#flood-fill-lake) + - [Spring](#spring) +- Decoration: + - [Boulder](#boulder) + - [Branching Cactus](#branching-cactus) + - [Loose Rock](#loose-rock) + - [Soil Disc](#soil-disc) + - [Iceberg](#iceberg) + - [Powder Snow](#powder-snow) + - [Weeping Vines](#weeping-vines) + - [Twisting Vines](#twisting-vines) + - [Creeping Plant](#creeping-plant) + - [Epiphyte Plant](#epiphyte-plant) + - [Kelp](#kelp) + - [Kelp Tree](#kelp-tree) + - [Emergent Plant](#emergent-plant) + - [Tall Plant](#tall-plant) + - [Tall Wild Crop](#tall-wild-crop) + - [Spreading Bush](#spreading-bush) + - [Tide Pool](#tide-pool) + - [Block With Fluid](#block-with-fluid) + - [Coral Claw](#coral-claw) + - [Coral Mushroom](#coral-mushroom) + - [Coral Tree](#coral-tree) + - [Vines](#vines) + - [Fruit Trees](#fruit-trees) + - [Bananas](#bananas) +- Technical: + - [Erosion](#erosion) + - [Ice And Snow](#ice-and-snow) + - [Multiple](#multiple) + - [If Then](#if-then) + - [Noisy Multiple](#noisy-multiple) + - [Dynamic Random Patch](#dynamic-random-patch) + + +## Caves + +### Cave Spike + +This places a single cave spike, either 2, 3 or 4 blocks tall, either from the ceiling or floor. It uses the rock type of the current position. + +- Type: `tfc:cave_spike` +- Config: None + +### Large Cave Spike + +This places a large cave spike, which can be up to 5 blocks wide and 16 blocks tall. It uses the rock type of the current position. + +- Type: `tfc:large_cave_spike` +- Config: None + +### Thin Spike + +This places a thin spike like block (calcite or iceicles), in a small cluster around a given location. + +- Type: `tfc:thin_spike` +- Config: + - `state`: A [Lenient Blockstate](../common-types/#lenient-blockstate) of the state to place. Must be a thin spike block. + - `radius`: A integer in the range [1, 16]. The radius around the target location to place spikes in. + - `tries`: A positive integer. The number of attempts to place spikes. + - `min_height`: A positive integer. The minimum height of a spike. + - `max_height`: A positive integer greater than or equal to `min_height`. The maximum height of a spike. + +### Cave Vegetation + +A feature that places cobwebs, additional uniformly distributed random block replacements, and water springs. + +- Type: `tfc:cave_vegetation` +- Config: + - `blocks`: A [Block Replacement Map](../common-types/#block-replacement-map) of representing random blocks to replace. + +### Ice Cave + +A feature that places ice in various formations within caves. + +- Type: `tfc:ice_cave` +- Config: None + +### Geode + +A feature that generates a simplified version of vanilla's Geode, a cracked sphere. The sphere has an outer and middle block, and then a replacement map for the inner blocks. +- Type: `tfc:geode` +- Config: + - `outer` A [Lenient Blockstate](../common-types/#lenient-blockstate) of the state to place on the outside layer. + - `middle` A [Lenient Blockstate](../common-types/#lenient-blockstate) of the state to place in the middle layer. + - `inner` A [Block Replacement Map](../common-types/#block-replacement-map) of blocks to place in the inner layer. + +## Fluids + +### Rivulet + +This creates small winding depressions that travel down slopes. The rivulet state is inset two blocks underneath the surface, with one block cleared above. It is what forms the magma trails on volcanoes. + +- Type: `tfc:rivulet` +- Config: + - `state`: A [Lenient Blockstate](../common-types/#lenient-blockstate). The state that the rivulet consists of. + +### Fissure + +This creates a winding one block wide fissure, filled with a given fluid, down from a given location. + +- Type: `tfc:fissure` +- Config: + - `wall_state`: An optional [Lenient Blockstate](../common-types/#lenient-blockstate). The state used for the wall blocks of the fissure. If not present, will use the rock type of the lowest rock layer. + - `fluid_state`: A [Lenient Blockstate](../common-types/#lenient-blockstate). The fluid state to fill the fissure with, can be air. + - `count`: An optional integer (Default: `5`). The number of fissures to place. + - `radius`: An optional integer (Default: `12`). The radius around the target position to try and place fissures in. + - `min_depth`: An optional [Vertical Anchor](../common-types/#vertical-anchor). + - `min_pieces`: An optional positive integer (Default: `10`). + - `max_pieces`: An optional positive integer (Default: `24`). + - `max_piece_length`: An optional positive integer (Default: `6`). + - `decoration`. An fissure decoration object with the following properties: + - `blocks`: A [Block Replacement Map](../common-types/#block-replacement-map). The additional 'decoration' ore veins that should spawn around the fissure. + - `rarity`: A positive integer. The rarity that blocks should be replaced with decoration ore states. + - `radius`: A positive integer. The radius around the fissure that blocks should be replaced. + - `count`: A positive integer. The number of blocks that should be replaced with decoration ore states. Actual amount will be `count / rarity`. + +### Hot Spring + +This creates a hot spring, with additional winding fissures underneath, filled with a given fluid. + +- Type: `tfc:hot_spring` +- Config: + - `wall_state`: An optional [Lenient Blockstate](../common-types/#lenient-blockstate), which the hot spring is built from. If omitted, the lowest rock layer rock will be used instead. + - `fluid_state`: A [Lenient Blockstate](../common-types/#lenient-blockstate) to fill the fissure with. Can be air. + - `radius`: An optional integer in the range [1, 16]. The approximate radius of the hot spring. + - `decoration`: An optional [Fissure Decoration](#fissure) object. + +### Flood Fill Lake + +A lake that fills existing terrain locally with a fluid. + +- Type: `tfc:flood_fill_lake` +- Config: + - `state`: A [Lenient Blockstate](../common-types/#lenient-blockstate) to fill the lake area with. + - `replace_fluids`: A string array. A list of fluids that can be replaced by this lake. + - `overfill`: An optional boolean (Default: `false`). If the lake should attempt to fill upwards from the starting position as well as downwards. + +### Spring + +A copy of the vanilla spring feature. + +- Type: `tfc:spring` +- Config: See the configuration for `minecraft:spring`. + +## Decoration + +### Boulder +Places a large boulder, shaped like a deformed sphere. + +- Type: `tfc:boulder` +- Config: + - `states`: A [Key Value List](../common-types/#key-value-list) with the following fields: + - `rock` A [Lenient Blockstate](../common-types/#lenient-blockstate) corresponding to the 'raw' rock block of a rock type. + - `blocks` An array of [Lenient Blockstates](../common-types/#lenient-blockstate) that will be chosen from randomly when placing the boulder. + +### Branching Cactus +Places a kind of branching cactus (eg. the Saguaro) + +- Type: `tfc:branching_cactus` +- Config: + - `block`: A branching cactus block. + +### Loose Rock +Places a loose rock on the ground based on the rock type at the position. + +- Type: `tfc:loose_rock` +- Config: None + +### Soil Disc +Places a disc of blocks. Typically used for soil replacements like clay, but can be used for anything. + +- Type: `tfc:soil_disc` +- Config: + - `states`: A [Key Value List](../common-types/#key-value-list) with the following fields: + - `replace`: A [Lenient Blockstate](../common-types/#lenient-blockstate) to be replaced + - `with`: A [Lenient Blockstate](../common-types/#lenient-blockstate) that gets set in that block's place. + - `min_radius`: A positive integer specifying the minimum horizontal radius of the disc. + - `max_radius`: A positive integer specifying the maximum horizontal radius of the disc. + - `height`: An integer [0, 256] specifying how tall the disc should be. + - `integrity`: A float [0, 1] (Default: `1.0`) specifying the probability any given block in the disc will place. If `1.0`, it will always place. + +### Iceberg +A modified version of vanilla's iceberg feature to use salt water. + +- Type: `tfc:iceberg` +- Config: + - `state`: The main block of the iceberg. + +### Powder Snow +Places a disc of a block, replacing anything with the `tfc:powder_snow_replaceable` [Block Tag](../../data/tags/) + +- Type: `tfc:powder_snow` +- Config: + - `state`: The block to place. + +### Weeping Vines +Places a cluster of long plants hanging down from leaves, logs, or stone. + +- Type: `tfc:weeping_vines` +- Config: + - `body`: A [Lenient Blockstate](../common-types/#lenient-blockstate) representing the main block of the vine. + - `head` A [Lenient Blockstate](../common-types/#lenient-blockstate) representing the tip of the vine. + - `tries`: An integer [1, 128] specifying how many times a vine placement should be attempted. + - `radius`: An integer [1, 16] specifying how far the cluster of vines should spread. + - `min_height`: An integer [1, 100] specifying the minimum length of a vine that should be placed. + - `max_height`: An integer [1, 100] specifying the maximum length of a vine that should be placed. + +### Twisting Vines +The same as [Weeping Vines](#weeping-vines), but it places plants that grow up from the ground. + +- Type: `tfc:twisting_vines` +- Config: See [Weeping Vines](#weeping-vines) + +### Creeping Plant +Places a cylinder of creeping plants on any block it is able to. + +- Type: `tfc:creeping_plant` +- Config: + - `block`: A block id of a creeping plant. + - `radius`: The radius of the cylinder. + - `height`: The height of the cylinder. + - `integrity`: A float [0, 1] (Default: `1.0`) specifying for any given block the chance it will be placed. If `1.0`, all will try to place. + +### Epiphyte Plant +Tries to place an epiphyte up to 12 blocks in the air from the position the feature is placed. + +- Type: `tfc:epiphyte_plant` +- Config: + - `block`: The block id of an epiphyte plant. + +### Kelp +The same as [Twisting Vines](#twisting-vines), but built to only place underwater plants on the sea floor. + +- Type: `tfc:twisting_vines` +- Config: See [Weeping Vines](#weeping-vines) + +### Kelp Tree +Places a cluster of tree kelp. + +- Type: `tfc:kelp_tree` +- Config: + - `block`: A block that is a kind of kelp tree flower, which will be forcibly grown into a kelp tree. + +### Emergent Plant +Places an emergent plant, with the bottom half of the block submerged and the top not submerged. + +- Type: `tfc:emergent_plant` +- Config: + - `block`: A tall water plant block to be placed. + +### Tall Plant +Places a two block high plant block. + +- Type: `tfc:tall_plant` +- Config: + - `block`: A tall plant block, to be placed. + +### Tall Wild Crop +Places a two block high wild crop block. + +- Type: `tfc:tall_wild_crop` +- Config: + - `block`: A tall wild crop block to be placed. + +### Spreading Bush +Places a spreading bush, with some growth already completed. + +- Type: `tfc:spreading_bush` +- Config: + - `block`: A spreading bush block to be grown. + +### Tide Pool +Places a small tide pool similar to vanilla's basalt deltas (but made of water). Use the tag `tfc:tide_pool_blocks` to add blocks that can spawn waterlogged in the water pools. + +- Type; `tfc:tide_pool` +- Config: None + +### Block With Fluid +Places a block, attempting to fill it with the fluid at the position it finds. If the block cannot contain the fluid, nothing is placed. + +- Type: `tfc:block_with_fluid` +- Config: + - `to_place`: A fully specified blockstate (see [Lenient Blockstate](../common-types/#lenient-blockstate) for what that looks like) + +### Coral Claw + +Places a coral claw, like vanilla, for TFC salt water oceans and corals. + +- Type: `tfc:coral_claw` +- Config: None + +### Coral Mushroom + +Places a coral mushroom feature, like vanilla, for TFC salt water oceans and corals. + +- Type: `tfc:coral_mushroom` +- Config: None + +### Coral Tree + +Places a coral tree feature, like vanilla, but for TFC salt water oceans and corals. + +- Type: `tfc:coral_tree` +- Config: None + +### Vines + +Places a single vine block. The vine block must be in the style of vanilla vines. + +- Type: `tfc:vine` +- Config: + - `state`: A fully defined blockstate. + +### Fruit Trees + +Locates a position for and places a fruit tree, fully grown. + +- Type: `tfc:fruit_trees` +- Config: + - `state`: A [Lenient Blockstate](../common-types/#lenient-blockstate) of the fruit tree's growing branch block. + +### Bananas + +Places a fully grown banana plant. + +- Type: `tfc:bananas` +- Config: + - `state`: A [Lenient Blockstate](../common-types/#lenient-blockstate) corresponding to a Banana-like plant block. + +## Technical + +### Erosion + +Traverses a chunk, either removing blocks or supporting them with hardened stone if it seems that they might fall when the chunk is loaded. + +- Type: `tfc:erosion` +- Config: None + +### Ice and Snow + +Conducts an initial climate update on the surface, adding ice and snow when appropriate. + +- Type: `tfc:ice_and_snow` +- Config: None + + +### Multiple + +This places all features in a list at the current position. + +- Type: `tfc:multiple` +- Config: + - `features`: A string array of configured feature ids to place. + +### If Then + +Attempts to place the first feature, and if that succeeds, places the second feature. + +- Type: `tfc:if_then` +- Config: + - `if`: A placed feature id, that will always try to place. + - `then`: The placed feature id, that will only place if the first feature places. + +### Noisy Multiple + +Similar to [Multiple](#multiple), except that only two of the provided features will be placed. The list of features is cycled through depending on the position in the world. If a feature is invalid at a position, it is skipped. The result is smooth transitions between different features. + +- Type: `tfc:noisy_multiple` +- Config: + - `features`: A string array of configured feature ids to place. + +### Dynamic Random Patch + +This feature is identical to vanilla's random patch feature, but limits the amount of `tries` (the amount of times the given feature will attempt to place) based on forest type and elevation. + +- Type: `tfc:dynamic_random_patch` +- Config: + - `feature`: A placed feature id to be placed. + - `xz_spread`: A positive Integer (Default: `7`), how far away laterally it will place the feature. + - `y_spread`: A positive Integer (Default: `3`), how far up and down it will place the feature. + - `tries`: The maximum amount of attempts to place this feature under perfect conditions. This feature dynamically limits this amount. diff --git a/1.20.x/worldgen/features/trees.md b/1.20.x/worldgen/features/trees.md new file mode 100644 index 0000000..23b792b --- /dev/null +++ b/1.20.x/worldgen/features/trees.md @@ -0,0 +1,114 @@ +--- +layout: page +title: "Trees and Forests" +permalink: /1.20.x/worldgen/features/trees/ +--- + +# Trees and Forests + +TFC uses the `tfc:forest` feature to place all trees of all types, and various other forest related decoration. This feature includes specifying the climate ranges for different trees, adhering to the global [Forest Type](../../common-types/#forest-type), selecting which tree types to generate in a given area, and placing forest adjacent decoration. + +If you are looking to **add new trees or modify existing trees**, you will want to start at [Forest Entries](#forest-entry). + +TFC also adds a few different features used for generating individual trees themselves. These can be used by datapacks but **are not required to use the TFC forest feature**. These are [Random Tree](#random-tree), [Overlay Tree](#overlay-tree), and [Stacked Tree](#stacked-tree). + +
+ +### Forest Feature + +This feature is added to all biomes via being present in the [Placed Feature Tag](../../tags/#placed-feature-tags) `#tfc:in_biome/large_features/` for every biome that may contain forests. + +- Type: `tfc:forest` +- Config: + - `entries`: A [Configured Feature Holder Set](../../common-types/#holder-set). Each entry **must** be a [Forest Entry](#forest-entry). In TFC, this references the + - `type`: The map with [Forest Types](../../common-types/#forest-type) as keys and the following config as values: + - `tree_count`: An integer provider specifying how many trees should spawn. + - `groundcover_count`: An integer provider specifying how much groundcover should spawn. + - `per_chunk_chance`: An optional float, by default 1, of the chance per chunk of this forest type spawning. + - `bush_count`: An optional integer provider specifying the amount of bushes that will try to spawn. + - `has_spoiler_old_growth`: A boolean specifying if a random old growth tree will occasionally spawn amongst the existing trees. + - `allows_old_growth`: A boolean specifying if old growth trees will spawn in this forest type. + - `use_weirdness`: A boolean specifying if forest weirdness will be used to gradually alternate between what forest entry is placed, causing more varied but less climate-accurate forests. + +
+ +### Forest Entry + +This feature is used to describe the spawning conditions of a single tree. They must be added to the [Configured Feature Tag](../../tags/#configured-feature-tags) `#tfc:forest_trees`, in order to be spawned by the `tfc:forest` feature. + +- Type: `tfc:forest_entry` +- Config: + - `min_rain`: The minimum rainfall for this tree to spawn. + - `max_rain`: The maximum rainfall for this tree to spawn. + - `min_temp`: The minimum temperature for this tree to spawn. + - `max_temp`: The maximum temperature for this tree to spawn. + - `bush_log`: An optional [Lenient Blockstate](../../common-types/#lenient-blockstate) specifying the log used for bushes. If omitted, no bushes will spawn. + - `bush_leaves`: An optional [Lenient Blockstate](../../common-types/#lenient-blockstate) specifying the leaves used for bushes. + - `groundcover`: An optional [Weighted List](../../common-types/#weighted-list) specifying the blocks that can spawn on the ground around the trees. + - `normal_tree`: A [Configured Feature](https://minecraft.wiki/w/Custom_feature#Configured_Feature) which will be used to place a normal tree. + - `dead_tree`: A [Configured Feature](https://minecraft.wiki/w/Custom_feature#Configured_Feature) which will be used to place a dead tree. + - `old_growth_tree`: An optional [Configured Feature](https://minecraft.wiki/w/Custom_feature#Configured_Feature) which will be used to place a rare "old growth" tree. + - `old_growth_chance`: (Default: `6`) An optional integer, representing the chance for an old growth tree to be selected. On average, 1 / `old_growth_chance` of trees will be old growth. + - `spoiler_old_growth_chance`: (Default: `200`) An optional integer, representing the chance for a old growth tree to spawn in non-old-growth forests. On average, 1 / `spoiler_old_growth_chance` of trees in these areas will be old growth. + - `fallen_tree_chance`: (Default: `14`) An optional integer, specifying how often fallen trees spawn. On average, 1 / `fallen_tree_chance` chunks will contain a fallen tree. + - `dead_chance`: (Default: `75`) An optional integer, specifying how often dead trees spawn. On average, 1 / `dead_chance` of trees will spawn as dead trees instead. + +
+ +### Random Tree + +This feature chooses structures randomly from a list, and places them. Optionally, it also creates a trunk of randomly chosen height beneath the tree. It is used for trees like Acacia and Kapok. + +- Type:`tfc:random_tree` +- Config: + - `structures`: A list of [Structures](../../common-types/#structure) to be placed. + - `trunk`: A [Trunk](#trunk) for the trunk below the structure. + - `placement`: A [Tree Placement](#tree-placement) + +### Overlay Tree + +This feature uses two structures: a "Base" structure, and an "Overlay" structure. The overlay structure is placed with each of it's blocks randomly chosen to place or not, using the "Integrity" option found in [Structure Blocks](https://minecraft.wiki/w/Structure_Block). It is used for trees like Oak and Ash. + +- Type: `tfc:overlay_tree` +- Config: + - `base`: A [Structure](../../common-types/#structure). + - `overlay`: A [Structure](../../common-types/#structure). + - `radius`: An integer. This value is unused. + - `trunk`: A [Trunk](#trunk) for the trunk below the structure. + - `overlay_integrity`: A float [0, 1] specifying the percent of the overlay structure that will be placed. + - `placement`: A [Tree Placement](#tree-placement) + +### Stacked Tree + +This feature uses multiple layers of structures to create a stacked appearance. It chooses a random number of structures from each layer, and then stacks them on top of each other. It is used by Old Growth Sequoia trees. + +- Type: `tfc:stacked_tree` +- Config: + - `layers`: A list of **layers**. Each layer must be an object with the following fields: + - `templates`: A list of [Structures](../../common-types/#structure). + - `min_count`: The minimum number of structures from this layer to use. + - `max_count`: The maximum number of structures from this layer to use. + - `trunk`: A [Trunk](#trunk) for the trunk below the structure. + - `placement`: A [Tree Placement](#tree-placement) + +
+ +There are a couple objects which are common to all tree features used by TFC: + +#### Trunk + +This is an object specifying the shape and size of a tree's trunk. It has the following properties: + +- `state`: A [Lenient Blockstate](../../common-types/#lenient-blockstate) of the trunk block. +- `min_height`: The integer minimum height of the trunk. +- `max_height`: The integer maximum height of the trunk. +- `width`: The integer width of the trunk, in blocks. + +#### Tree Placement + +This is an object specifying how and when trees are placed in the world. It has the following properties: + +- `width`: An integer specifying width of ground clearance needed. +- `height`: An integer specifying the open height needed to place the tree. +- `allow_submerged`: A boolean, if the tree can spawn in one block of water. +- `allow_deeply_submerged`: A boolean, if the tree can spawn in any height of water. \ No newline at end of file diff --git a/1.20.x/worldgen/features/veins.md b/1.20.x/worldgen/features/veins.md new file mode 100644 index 0000000..9e51ae1 --- /dev/null +++ b/1.20.x/worldgen/features/veins.md @@ -0,0 +1,60 @@ +--- +layout: page +title: "Ore Veins" +permalink: /1.20.x/worldgen/features/veins/ +--- + +# Ore Veins + +TFC's ore veins are generated using three different features: [Cluster Vein](#cluster-vein), [Disc Vein](#disc-vein), and [Pipe Vein](#pipe-vein). These are used to generate veins that span across many chunks, unlike normal [Features](https://minecraft.wiki/w/Custom_feature). + +In order to do this, veins must be added to **every biome** in the same dimension, even if they cannot spawn in some biomes. Veins must instead whitelist certain biomes using their own biome filter. + +In TFC, vein features are all added to the [Placed Feature Tag](../../tags/#placed-feature-tags) `#tfc:in_biome/veins`, which contains all ore veins placed during world generation. To add a new vein, simply add it to this tag and TFC will generate it in the world. + +All vein features have several common options which apply to all veins: + +- `blocks`: A [Block Replacement Map](../../common-types/#block-replacement-map) defining what blocks the ore vein will place. +- `rarity`: An optional positive integer (Default: `60`). The vein will occur in 1 / `rarity` chunks on average. +- `size`: An optional integer (Default: `8`). +- `density`: An optional number in the range [0, 1] (Default: `0.2`). +- `min_y`: A [Vertical Anchor](../../common-types/#vertical-anchor). The minimum y level at which the vein will spawn. +- `max_y`: A [Vertical Anchor](../../common-types/#vertical-anchor). The maximum y level at which the vein will spawn. +- `salt`: An integer which represents a random seed to the vein locations. +- `biomes`: An optional array of objects, which can have one of two fields. This represents a filter for allowed biomes. If omitted, all biomes will be allowed. + - `category`: A [Biome Category](../../common-types/#biome-category). + - `biome_dictionary`: A [Biome Dictionary](../../common-types/#biome-dictionary) tag. +- `indicator`: An optional object representing an indicator to spawn on the surface above the vein. If present, it must have the following fields: + - `depth`: An optional positive integer (Default: `35`). The maximum depth below the surface that the vein will spawn an indicator at. + - `spread`: An optional positive integer (Default: `15`). The maximum horizontal distance from a vein that can spawn an indicator. + - `rarity`: An optional positive integer (Default: `10`). The rarity to spawn indicators, as a fraction of horizontal locations the vein places ore blocks. + - `blocks`: A [Weighted List](../../common-types/#weighted-list) of indicator states to spawn, with the following value: + - Value `block`: A [Lenient Blockstate](../../common-types/#lenient-blockstate) to spawn. + +### Cluster Vein + +A vein that places blob-like shapes using [Metaballs](https://en.wikipedia.org/wiki/Metaballs). + +- Type: `tfc:cluster_vein` +- Additional Config: None + +### Disc Vein + +A vein that places a flat horizontal disc. + +- Type: `tfc:disc_vein` +- Additional Config: + - `height`: The height of the disc. The `size` parameter is interpreted as the radius. + +### Pipe Vein + +A vein that places a tall pipe, that can be skewed or slanted. Skew represents the horizontal variance of the vein position, with height. Slant represents the variance of the vein's horizontal radius, with height. The sign of the slant represents if the vein narrows as y increases, or thickens as y increases. + +- Type: `tfc:pipe_vein` +- Additional Config: + - `radius`: An optional positive integer (Default: `3`). The radius of the pipe vein. + - `min_skew`: An optional positive integer (Default: `0`). The minimum skew of the vein. + - `max_skew`: An optional positive integer (Default: `0`). The maximum skew of the vein. + - `min_slant`: An optional positive integer (Default: `0`). The minimum slant of the vein. + - `max_slant`: An optional positive integer (Default: `0`). The maximum slant of the vein. + - `sign`: An optional number in [0, 1] (Default: `0.5`) The sign of the slant. \ No newline at end of file diff --git a/1.20.x/worldgen/index.md b/1.20.x/worldgen/index.md new file mode 100644 index 0000000..0b883b0 --- /dev/null +++ b/1.20.x/worldgen/index.md @@ -0,0 +1,25 @@ +--- +layout: page +title: "World Generation" +permalink: /1.20.x/worldgen/ +--- + +# World Generation + +Note: this documentation will assume a working knowledge of how both data packs, and custom world generation works in vanilla Minecraft. If you are unfamiliar with those topics, the wiki provides a good starting point to learn about [Data Packs](https://minecraft.gamepedia.com/Data_Pack), [Custom World Generation](https://minecraft.gamepedia.com/Custom_world_generation), and [Custom Dimensions](https://minecraft.gamepedia.com/Custom_dimension). + +TFC exposes the "TFC World Generation" `level-type` (for servers), and preset (for clients). When you create a new world using this generation, it creates a default chunk generator and biome source. In order to modify these, you will need to override the overworld dimension (`data/minecraft/dimension/overworld.json`), and use the TFC chunk generator and biome source. More information can be found in the [dimension](dimension/) article. + +All other world generation, including biomes, configured features, decorators, carvers, and surface builders can be customized to various extents by replacing the specific files. + +Finally, **all** of TFC's world generation is already done using JSON, and every existing file can be found in the [world generation folder](https://github.com/TerraFirmaCraft/TerraFirmaCraft/tree/1.20.x/src/main/resources/data/tfc/worldgen) in the TFC repository. + +### Sections + +- [Dimension](dimension/) +- [Biomes](biomes/) +- [Configured Features](features/) +- [Decorators](decorators/) +- [Configured Carvers](carvers/) +- [Common Types](common-types/) +- [WorldGen Tags](tags/) diff --git a/1.20.x/worldgen/tags.md b/1.20.x/worldgen/tags.md new file mode 100644 index 0000000..4c70f7e --- /dev/null +++ b/1.20.x/worldgen/tags.md @@ -0,0 +1,54 @@ +--- +layout: page +title: "WorldGen Tags" +permalink: /1.20.x/worldgen/tags/ +--- + +This page details all the world generation tags TFC adds. For generic tags, see [Tags](../../data/tags/). + +## Biome Tags + +Tag Id | Function +---|--- +`tfc:is_lake` | All lake biomes, including underground lakes. +`tfc:is_river` | All river biomes, including underground rivers. +`tfc:is_volcanic` | All volcanic biomes. + +## Configured Feature Tags + +Tag Id | Function +---|--- +`tfc:forest_trees` | A list of all tree entries which are used by the `tfc:forest` feature. These features are not generated directly, rather their configurations are used by the forest feature to determine what trees to actually place. + +## Placed Feature Tags + +Tag Id | Function +---|--- +`tfc:feature/berry_bushes` | All berry bush patch features. +`tfc:feature/boulders` | All boulder features. +`tfc:feature/clay_indicators` | All clay indicator plant features. +`tfc:feature/corals` | All coral features. +`tfc:feature/crops` | All crop patch features. +`tfc:feature/forest_plants` | All plants that are placed within biomes that support forests. +`tfc:feature/fruit_trees` | All fruit tree features. +`tfc:feature/icebergs` | All iceberg features. +`tfc:feature/land_plants` | All plants that are placed within biomes that support any type of land. +`tfc:feature/ocean_decorations` | All features that are ocean specific decoration. +`tfc:feature/ocean_plants` | All plant features that are ocean specific. +`tfc:feature/ore_deposits` | All ore deposits - the smaller gravel ores that are found in rivers and lakes. +`tfc:feature/shore_decorations` | All features that are shore specific decoration. +`tfc:feature/soil_discs` | All standard soil discs, including clay, peat, and powder snow. +`tfc:feature/surface_grasses` | A tag used by the `tfc:surface_grass` feature to select one or two grasses to generate in a given area. +`tfc:feature/volcanoes` | All features generated in volcanic biomes. +`tfc:in_biome/all_lakes` | All lake features, including those in `tfc:in_biome/underground_lakes`. +`tfc:in_biome/erosion` | A tag which just contains the `tfc:erosion` feature. +`tfc:in_biome/strongholds` | Empty. +`tfc:in_biome/surface_structures` | Empty. +`tfc:in_biome/top_layer_modification` | Features placed in the top layer modification step. +`tfc:in_biome/underground_decoration` | Features placed in the underground decoration step. +`tfc:in_biome/underground_lakes` | Only underground lake features. +`tfc:in_biome/underground_structures` | Features placed in the underground structures step. +`tfc:in_biome/veins` | Features placed in the ore veins step. +`tfc:in_biome/large_features/` | Where `` is the registry name of a TFC biome, the features placed in that biome in the large features step. +`tfc:in_biome/soil_discs/` | Where `` is the registry name of a TFC biome, the features placed in that biome in the soil discs step. +`tfc:in_biome/surface_decoration/` | Where `` is the registry name of a TFC biome, the features placed in that biome in the surface decoration step.