Skip to content

Tag Patterns

Overview

Tag patterns provide a boolean logic system for matching tagged content. They use operators like And, Or, Not, and Equals to create complex matching rules for environments, blocks, NPCs, and other tagged entities.

File Location

Server/TagPatterns/*.json

Operators

OperatorPurposeFields
EqualsMatch a single tagTag
OrMatch any of the patternsPatterns (array)
AndMatch all of the patternsPatterns (array)
NotInvert a patternPattern (single)

Examples

Simple OR match

{
"Op": "Or",
"Patterns": [
{ "Op": "Equals", "Tag": "Bush" },
{ "Op": "Equals", "Tag": "Seed" }
]
}

Matches any block tagged as either Bush or Seed.

Complex AND + NOT

{
"Op": "And",
"Patterns": [
{ "Op": "Equals", "Tag": "Caves" },
{
"Op": "Not",
"Pattern": {
"Op": "Or",
"Patterns": [
{ "Op": "Equals", "Tag": "Volcanic" },
{ "Op": "Equals", "Tag": "Spiders" },
{ "Op": "Equals", "Tag": "Dungeons" }
]
}
}
]
}

Matches environments tagged as Caves but NOT Volcanic, Spiders, or Dungeons.

Where Tags Are Used

  • Environment audio — select ambient sounds based on environment tags
  • NPC spawning — restrict spawns to specific tagged biomes
  • Block interactions — match block types by tag groups