{
  "format_version": "1.8.0",
  "minecraft:spawn_rules": {
    "description": {
      "identifier": "minecraft:piglin",
      "population_control": "monster"
    },
    "conditions": [
      {
        "minecraft:spawns_underground": {},

        "minecraft:spawns_on_block_prevented_filter": [
          "minecraft:nether_wart_block",
          "minecraft:shroomlight"
        ],
        "minecraft:difficulty_filter": {
          "min": "peaceful",
          "max": "hard"
        },

        "minecraft:weight": {
          "default": 5
        },

        "minecraft:herd": {
          "min_size": 2,
          "max_size": 4
        },

        "minecraft:biome_filter": {
          "test": "has_biome_tag",
          "operator": "==",
          "value": "spawn_piglin"
        }
      },
      {
        "minecraft:spawns_underground": {},

        "minecraft:spawns_on_block_prevented_filter": [
          "minecraft:nether_wart_block",
          "minecraft:shroomlight"
        ],
        "minecraft:difficulty_filter": {
          "min": "easy",
          "max": "hard"
        },

        "minecraft:weight": {
          "default": 15
        },

        "minecraft:herd": {
          "min_size": 4,
          "max_size": 4
        },

        "minecraft:biome_filter": {
          "test": "has_biome_tag",
          "operator": "==",
          "value": "spawn_few_piglins"
        }
      }

    ]
  }
}