Skip to content

In Range

  • Id: moderner_beta:in_range
  • Added in: 3.1.0

The In Range biome predicate returns true if a biome is inside a specified shape.

Properties

  • centerX
    • Type: int
    • Default: 0
    • Description: The X position of the shape's center.
  • centerZ
    • Type: int
    • Default: 0
    • Description: The Z position of the shape's center.
  • radiusX
    • Type: int
    • Default: required
    • Description: The radius of the shape along the X axis.
  • radiusZ
    • Type: int
    • Default: required
    • Description: The radius of the shape along the Z axis.
  • evenSize
    • Type: bool
    • Default: false
    • Description: When set to true, the shape is 1 biome larger across negative X and negative Z.
  • shape
    • Type: string
    • Default: required
    • Description: The kind of shape used for the predicate.
    • Possible values:
      • circle
      • rectangle
      • diamond

Example

JSON

json
{
  "id": "land",
  "parent": "land",
  "type": "moderner_beta:conditional_overlay",
  "predicate": {
    "condition": "moderner_beta:any_of",
    "terms": [
      {
        "condition": "moderner_beta:in_range",
        "radiusX": 64,
        "radiusZ": 64,
        "evenSize": true,
        "shape": "circle"
      },
      {
        "condition": "moderner_beta:in_range",
        "centerX": 128,
        "radiusX": 32,
        "radiusZ": 32,
        "evenSize": true,
        "shape": "diamond"
      },
      {
        "condition": "moderner_beta:in_range",
        "centerX": -128,
        "radiusX": 32,
        "radiusZ": 32,
        "evenSize": true,
        "shape": "rectangle"
      },
      {
        "condition": "moderner_beta:in_range",
        "radiusX": 128,
        "radiusZ": 24,
        "centerZ": 96,
        "evenSize": true,
        "shape": "circle"
      }
    ]
  },
  "onMatch": {
    "type": "layer",
    "value": "land"
  },
  "otherwise": {
    "type": "biome",
    "value": "minecraft:ocean"
  }
}

Output