Processor Conditions - Apollounknowndev/lithostitched GitHub Wiki

Processor conditions are used alongside the condition processor type for more readable and flexible processor code.


all_of

Checks a list of processor conditions. If all pass, this passes.

{
  "type": "lithostitched:all_of",
  "conditions": [
    {
      "type": "lithostitched:true"
    }
  ]
}
  • conditions: The list of conditions to check.

any_of

Checks a list of processor conditions. If any pass, this passes.

{
  "type": "lithostitched:any_of",
  "conditions": [
    {
      "type": "lithostitched:true"
    }
  ]
}
  • conditions: The list of conditions to check.

matching_blocks

Checks if the current blocks either in the template or in the world match given conditions.

{
  "type": "lithostitched:matching_blocks",
  "blocks": "#example:stone_stairs",
  "properties": {
    "waterlogged": "false"
  },
  "match_type": "input"
}
  • blocks: A block, list of blocks, or tag of blocks to check against.
  • properties: An optional list of block properties to check. Defaults to not checking any states.
  • match_type: The type of matching to do. input checks against the block in the structure template, location checks against the block in the world getting replaced. Defaults to input.

not

Inverts the supplied condition. If the condition fails, this passes.

{
  "type": "lithostitched:not",
  "condition": {
    "type": "lithostitched:true"
  }
}
  • condition: The structure conditions to invert.

position

Checks a position rule test.

{
  "type": "lithostitched:position",
  "predicate": {
    "predicate_type": "minecraft:linear_pos",
    "max_chance": 0.3,
    "max_dist": 10,
    "min_chance": 0.1,
    "min_dist": 0
  },
  "anchor": "piece"
},
  • predicate: The position rule test to check.
  • anchor: The positional anchor to base the check on. Possible fields are structure_start for current/vanilla behavior and piece for piece-relative position checks.

random_chance

The random_chance processor condition will randomly pass.

{
  "type": "lithostitched:random_chance",
  "chance": 0.4
}
  • chance: The chance the processor condition will pass. A float from 0.0 to 1.0.

true

Always passes. No further fields.