Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Config Conditions

Corgi Taco edited this page Dec 28, 2021 · 31 revisions

This page will cover the available conditions that come shipped with Mobifier by default

Attribute Condition

  • The attribute condition lets you check a mob's current attributes such as HP or attack damage with a double comparator.
  • This requires all listed checks to pass.
  "conditions_to_apply": [
    {
      "attribute_is": {
        "minecraft:generic.max_health": ">=5"
      },
      "type": "mobifier:attribute"
    }
  ]

Biome Category Condition

  • This condition checks whether or not a the biome a mob is in is within the given biome category. The following biome categories are acceptable arguments: none, taiga, extreme_hills, jungle, mesa, plains, savanna, icy, the_end, beach, forest, ocean, desert, river, swamp, mushroom, nether, underground (1.17+).
  • Requires the mob to be in one of these biome categories to pass.
  "conditions_to_apply": [
    {
      "biome_category_is": [
        "icy"
      ],
      "type": "mobifier:biome_category"
    }
  ]

Blocks Are Condition

  • This condition checks whether or not block(s) are at an offset position from the entity.
{
  "conditions_to_apply": [
    {
      "has": [
        {
          "is": [
            "minecraft:snow_block"
          ],
          "offset": [
            0,
            -1,
            0
          ]
        }
      ],
      "type": "mobifier:blocks_are"
    }
  ]
}

Blockstates Are Condition

  • This condition checks whether or not blockstate(s) are at an offset position from the entity.
  "conditions_to_apply": [
    {
      "has": [
        {
          "is": [
            {
              "Name": "minecraft:oak_sapling",
              "Properties": {
                "stage": "0"
              }
            }
          ],
          "offset": [
            0,
            -1,
            0
          ]
        }
      ],
      "type": "mobifier:blockstates_are"
    }
  ]

Chance Condition

  • Lets you argue a percentage chance of this condition passing based off the world's random
{
  "conditions_to_apply": [
    {
      "chance": 0.5,
      "type": "mobifier:chance"
    }
  ]
}

Difficulty Condition

  • Let's you argue whether or not the world difficulty will let this condition pass.
{
  "conditions_to_apply": [
    {
      "difficulty_is": {
        "PEACEFUL": false,
        "EASY": true,
        "NORMAL": true,
        "HARD": true
      },
      "type": "mobifier:difficulty"
    }
  ]
}

Every Amount of Days Condition

  • Specify every amount of days that this condition will work. I.e: This condition only works on every 5th day(Day 5, 10, 15, 20, 25...)
  • offset & day_length fields are optional.
  • offset is a shift in days. I.e: offset=2 would mean that if you specified the condition passes every 5 days, the condition would pass on the world's day 7, 13, 18, 23...
  • amount_of_days allows you to specify multiple values. I.e: If you specify "amount_of_days": [5, 7] the condition will pass every 5th & 7th day.
{
  "conditions_to_apply": [
    {
      "amount_of_days": [
        5, 
        7
      ],
      "offset": 3,
      "day_length": 24000
      "type": "mobifier:every_amount_of_days"
    }
  ]
}

Clone this wiki locally