Path Styles - JMilamber/TravelersCrossroads GitHub Wiki

Style Types

All styles contain the following fields:

  1. "Biomes" - a link to a biome tag(s) for which biomes the path can spawn in,
  2. "Main Path block" - A blockstate for the desired main path block
  3. "Path Size" - the width of the path. Four options are available:
    • TINY - 1 block wide
    • SMALL - 2 blocks wide
    • MEDIUM - 3 blocks Wide
    • LARGE - 4 blocks wide

During path placement, a style is selected randomly from the list of styles that match the biome where the crossroad it placed. When each section of the path is placed, the style is used to select which block is placed for each blockpos that is a part of the path.

Percent Style

The core style. Uses set percentages and random numbers to select a pathblock to place. Contains the following fields:

  1. "Texture Blocks" - A list of blocks to use a texture blocks for the path.
  2. "Main Block Chance" - 0-100 the chance of the selected block the main path block
  3. "Texture Block Chance" - 0-100 the chance of the selected block being a texture block
  4. "Skip Block Chance" - 0-100 the chance of the blockpos being left as its natural state.

A random block is selected by generating a random integer between 0 and the total of all three chances. If the random integer is below the value of the main block chance then the main block is selected. If it is below the combined value of the main block chance and the texture block chance then a texture block is randomly selected from the list of texture blocks. If the number is not below either, then the block is left in its natural state.

using the example from below, the combined total chance is 100. So lets pretend the number rolled is a 55, that is greater than the main block chance, but less than the combined main block and texture block chance so gravel or coarse dirt are randomly selected to be placed.

Example from default_style.json:

{
  "type": "travelers_crossroads:percent_style",
  "biomes": "#minecraft:is_overworld",
  "main_block_chance": 60,
  "main_path_block": {
    "type": "minecraft:simple_state_provider",
    "state": {
      "Name": "minecraft:dirt_path"
    }
  },
  "pathSize": "SMALL",
  "skip_block_chance": 10,
  "texture_block_chance": 30,
  "texture_blocks": [
    {
      "Name": "minecraft:gravel"
    },
    {
      "Name": "minecraft:coarse_dirt"
    }
  ]
}

Sparse Style

An extension of the percent style set with the percent chances already set:

  1. "Texture Blocks" - A list of blocks to use a texture blocks for the path.
  2. "Main Block Chance" - Set to 50
  3. "Texture Block Chance" - Set to 20
  4. "Skip Block Chance" - Set to 30

Example from sparse_gravel_style.json:

{
  "type": "travelers_crossroads:sparse_style",
  "biomes": "#c:is_temperate/overworld",
  "main_path_block": {
    "type": "minecraft:simple_state_provider",
    "state": {
      "Name": "minecraft:gravel"
    }
  },
  "pathSize": "MINI",
  "texture_blocks": [
    {
      "Name": "minecraft:coarse_dirt"
    }
  ]
}