Skip to content

Aquarium Modifier Condition

Sky James edited this page Aug 30, 2023 · 4 revisions

Overview

Aquarium Modifier Conditions determine when an Aquarium Modifier is active. Inactive Aquarium Modifiers do not provide any bonuses and do not count toward mandatory categories.

Data

The following data is required for all modifier conditions.

  • type (namespaced ID)
    • The registry ID of the Modifier Condition

Min Max Bounds

Many modifier conditions require a number or a range of numbers. This is referred to as Min Max Bounds. They can be defined using a single number or using a minimum and/or maximum.

Data

  • min (number) Optional
    • The minimum number, inclusive. When not specified, allows all numbers less than max.
  • max (number) Optional
    • The maximum number, inclusive. When not specified, allows all numbers greater than min.

JSON Format

The following Min Max Bounds accepts exactly 24.

"value": 24

The following Min Max Bounds accepts any number from 1 to 10 (inclusive).

"value": {
  "min": 1,
  "max": 10
}

The following Min Max Bounds accepts 5 or greater.

"value": {
  "min": 5
}

The following Min Max Bounds accepts any number.

"value": {}

True Modifier Condition

This condition always passes.

JSON Format

{
  "type": "axolootl:true"
}

False Modifier Condition

This condition never passes.

JSON Format

{
  "type": "axolootl:false"
}

Exists Modifier Condition

This condition passes when at least one specified aquarium modifier (excluding this one) is present in the tank.

Data

  • modifier (Aquarium Modifier Holder Set) Required
  • active (true|false) Optional
    • Whether to only count modifiers that are currently active. Defaults to false.

JSON Format

The following modifier condition passes when there is at least one axolootl:bubbler modifier in the aquarium.

{
  "type": "axolootl:exists",
  "modifier": "axolootl:bubbler",
  "active": false
}

Count Modifier Condition

This condition passes when there is a specific number of the specified aquarium modifier(s) (excluding this one) in the tank. When there are too few or too many matching modifiers, all of them become inactive. To allow up to a certain number of aquarium modifiers, use the Count Capped Modifier Condition.

Data

  • modifier (Aquarium Modifier Holder Set) Required
  • count (number|Min Max Bounds) Required
  • active (true|false) Optional
    • Whether to only count modifiers that are currently active. Defaults to false.

JSON Format

The following modifier condition passes when there are between 1 and 5 (inclusive) axolootl:pump or axolootl:powered_pump active modifiers in the aquarium.

{
  "type": "axolootl:count",
  "modifier": [
    "axolootl:pump",
    "axolootl:powered_pump"
  ],
  "count": {
    "min": 1,
    "max": 5
  },
  "active": true
}

Count Capped Modifier Condition

This condition passes for the first few aquarium modifier(s) (excluding this one) in the tank. When there are too many matching modifiers, the specified number of modifiers remain active while all others become inactive.

Data

  • modifier (Aquarium Modifier Holder Set) Required
  • count (number) Required
  • active (true|false) Optional
    • Whether to only count modifiers that are currently active. Defaults to false.

JSON Format

The following modifier condition passes for the first 10 modifiers in the axolootl:coral_cluster tag.

{
  "type": "axolootl:count_capped",
  "modifier": "#axolootl:coral_cluster",
  "count": 10
}

Not Modifier Condition

This condition passes when its internal condition does not pass.

Data

JSON Format

The following modifier condition passes when there are not exactly 10 axolootl:coral_cluster modifiers.

{
  "type": "axolootl:not",
  "child": {
    "type": "axolootl:count",
    "modifier": "axolootl:coral_cluster",
    "count": 10
  }
}

And Modifier Condition

This condition passes when all of its internal conditions pass.

Data

JSON Format

The following modifier condition passes when the axolootl:pump modifier exists and a random number generator passes with a 50% chance.

{
  "type": "axolootl:and",
  "children": [
    {
      "type": "axolootl:exists",
      "modifier": "axolootl:pump"
    },
    {
      "type": "axolootl:chance",
      "chance": 0.5
    }
  ]
}

Or Modifier Condition

This condition passes when one or more of its internal conditions pass.

Data

JSON Format

The following modifier condition passes when either a the block has 10 or more Forge Energy or there is exactly one axolootl:kelp modifier.

{
  "type": "axolootl:or",
  "children": [
    {
      "type": "axolootl:energy",
      "energy": 10
    },
    {
      "type": "axolootl:count",
      "modifier": "axolootl:kelp",
      "count": 1
    }
  ]
}

Axolootl Count Modifier Condition

This condition passes when there are a specified number of a specified axolootl variant inside the aquarium.

Data

  • variant (Axolootl Variant Holder Set) Optional
  • count (number|Min Max Bounds) Required
    • The number or range of the specified axolootl variant to allow.

JSON Format

The following modifier condition passes when there are at least 3 axolootl:stone axolootls in the aquarium.

{
  "type": "axolootl:axolootl_count",
  "variant": "axolootl:stone",
  "count": {
    "min": 3
  }
}

Distance Modifier Condition

This condition passes when a specified aquarium modifier is within a specified number of blocks from the modifier. The distance is measured according to Taxicab distance AKA Manhattan distance. This means, for example, a diagonally adjacent block would have a distance of 2.

Data

  • modifier (Aquarium Modifier Holder Set) Required
  • distance (number|Min Max Bounds) Required
    • The distance or range to test for the specified aquarium modifier(s)
  • offset (XYZ) Optional
    • An amount to offset from the modifier position, useful for multiblocks. Defaults to [0, 0, 0].

JSON Format

The following modifier condition passes when there is an axolootl:nursery modifier no more than 5 blocks from the modifier.

{
  "type": "axolootl:distance",
  "modifier": "axolootl:nursery",
  "distance": {
    "max": 5
  }
}

Time Modifier Condition

This condition passes when the game time (calculated by 24000 * day count + day time) is within some range and period, similar to the Time Check Predicate used in loot tables.

Data

  • period (number) Optional
    • The amount to modulo reduce the game time before comparing it to the range.
  • range (number|Min Max Bounds)
    • A number or range of time values to allow.

JSON Format

The following modifier condition passes when the game time is between 0 and 6000 every 24000 ticks (in other words, it passes during the first half of the day and fails at other times)

{
  "type": "axolootl:time",
  "period": 24000,
  "range": {
    "min": 0,
    "max": 6000
  }
}

Weather Modifier Condition

This condition passes when the weather at the block position matches some value, similar to the Weather Check Predicate used in loot tables. When neither raining nor thundering are defined, the condition never passes.

Data

  • raining (true|false) Optional
    • When true, the condition passes if it is raining or thundering. When false, the condition passes only if it is not raining. When omitted, raining is ignored.
  • thundering (true|false) Optional
    • When true, the condition passes if it is thundering. When false, the condition passes only if it is not thundering. When omitted, thundering is ignored.

JSON Format

The following modifier condition passes when it is raining and not thundering.

{
  "type": "axolootl:weather",
  "raining": true,
  "thundering": false
}

Chance Modifier Condition

This condition passes when a random number is generated that is below a specified number.

Data

  • chance (number) Required

JSON Format

The following modifier condition passes 42% of the time.

{
  "type": "axolootl:chance",
  "chance": 0.42
}

Block Modifier Condition

This condition passes when the block state at the modifier position matches some predicate.

Data

  • predicate (Block Predicate) Required
    • The Block Predicate to test at the modifier position.

JSON Format

The following modifier condition passes when the block at the modifier position is a lit smoker.

{
  "type": "axolootl:block",
  "predicate": {
    "type": "axolootl:matching_state",
    "blocks": "minecraft:smoker",
    "state": {
      "lit": true
    }
  }
}

Energy Modifier Condition

This condition passes when the block at the modifier position contains at least the specified amount of Forge Energy.

Data

  • energy (number) Required
    • The minimum amount of energy (inclusive) to require.

JSON Format

The following modifier condition passes when the block at the modifier position has at least 10 Forge Energy units stored.

{
  "type": "axolootl:energy",
  "energy": 10
}

Location Modifier Condition

This condition passes when the block at the modifier position matches certain conditions, similar to the Location Check Predicate used in loot tables.

Min Max Bounds

A single number or a range of numbers. When not defined as a single number and neither min nor max are specified, all numbers are allowed.

  • min (number) Optional
    • The minimum number, inclusive. When not specified, allows all numbers less than max.
  • max (number) Optional
    • The maximum number, inclusive. When not specified, allows all numbers greater than min.

Position

Contains X, Y, and Z bounds to test.

  • x (number|Min Max Bounds) Optional
    • The x position to allow. When not specified, x position is ignored.
  • y (number|Min Max Bounds) Optional
    • The y position to allow. When not specified, y position is ignored.
  • z (number|Min Max Bounds) Optional
    • The z position to allow. When not specified, z position is ignored.

Fluid Predicate

Contains a fluid and fluid properties to test.

  • fluid (namespaced ID) Optional
  • tag (namespaced ID) Optional
    • The fluid tag.
  • state (map of Block State Property to value) Optional
    • The block state properties to test. Only exact values are supported (min and max are not currently supported)

Data

  • position (Position) Optional
    • The world-space coordinates to allow the modifier to be active. When not specified, the position is ignored.
  • offset (XYZ) Optional
    • The offset to apply before testing the modifier position. Defaults to [0, 0, 0].
  • biome (Biome Holder Set) Optional
    • One or more Biomes to allow the modifier to be active. When not specified, the biome is ignored.
  • structure (Structure Holder Set) Optional
    • One or more Structures to allow the modifier to be active. When not specified, structures are ignored.
  • dimension (Dimension Holder Set) Optional
    • One or more Dimensions to allow the modifier to be active. When not specified, the dimension is ignored.
  • smokey (true|false) Optional
    • When true, passes if the block has smoke. When false, passes if the block does not have smoke. When omitted, smoke is ignored.
  • light (number|Min Max Bounds) Optional
    • The light level to test at the modifier position. When omitted, light levels are ignored.
  • fluid (Fluid Predicate) Optional
    • The fluid at the modifier position. When omitted, fluids are ignored.
  • block (Block Predicate) Optional
    • The block predicate to test at the modifier position. Defaults to true.

JSON Format

The following modifier condition passes when the modifier is between y=0 and y=256 (inclusive) in an ocean or deep ocean biome. The modifier position must have a light level of 4 or higher.

{
  "type": "axolootl:location",
  "position": {
    "y": {
      "min": 0.0,
      "max": 256.0
    }
  },
  "biome": [
    "minecraft:ocean",
    "minecraft:deep_ocean"
  ],
  "light": {
    "min": 4
  }
}