Skip to content

Aquarium Modifier

Sky James edited this page Nov 27, 2023 · 5 revisions

Overview

Aquarium Modifiers represent one or more blocks and a set of bonuses that are given when the block is inside an aquarium.

Usage

Create a JSON file located at data/[namespace]/axolootl/aquarium_modifiers/[path].json where [namespace]:[path] is the ID of the Aquarium Modifier. Names must be lowercase and contain no spaces.

Mandatory Aquarium Modifiers

To indicate that certain aquarium modifiers must be present for the aquarium to function, create a Tag at data/[namespace]/tags/axolootl/aquarium_modifiers/mandatory/[path].json. Add one or more aquarium modifier IDs to the tag. The aquarium will only function if at least one of the modifiers in the tag are present in the tank.

Data

  • translation_key (string) Required
    • The translation key for the display name of the aquarium modifier.
  • settings (Aquarium Modifier Settings) Required
    • The bonuses provided by the aquarium modifier.
  • dimensions (XYZ) Optional
    • The X, Y, and Z size of the aquarium modifier, for use by multiblock modifiers. Defaults to [1, 1, 1].
  • block (Block Predicate) Optional
    • Any Block State inside the aquarium that matches the predicate will count as this aquarium modifier. Defaults to false.
  • condition (Aquarium Modifier Condition) Optional
    • The condition that determines if an aquarium modifier is active. Inactive Aquarium Modifiers do not provide any bonuses and do not count toward mandatory categories. For example, the count_capped condition can be used to ensure that the bonuses provided by a modifier "max out" after placing too many of the same block. Defaults to true.

JSON Format

The following Aquarium Modifier uses the same translation key as Bubble Coral and applies to bubble coral and bubble coral fans. It actively provides a +6% resource generation speed bonus for the first 2 axolootl:bubble_coral aquarium modifiers and the first 10 aquarium modifiers in the axolootl:coral_cluster aquarium modifier tag.

{
  "translation_key": "block.minecraft.bubble_coral",
  "settings": {
    "generation": 0.06
  },
  "block": {
    "type": "minecraft:matching_blocks", // note: in 1.19.3, use "axolootl:matching_blocks"
    "blocks": [
      "minecraft:bubble_coral",
      "minecraft:bubble_coral_fan"
    ]
  },
  "condition": {
    "type": "axolootl:and",
    "children": [
      {
        "type": "axolootl:count_capped",
        "modifier": "axolootl:bubble_coral",
        "count": 2
      },
      {
        "type": "axolootl:count_capped",
        "modifier": "#axolootl:coral_cluster",
        "count": 10
      }
    ]
  }
}

Modifier Settings

Contains information about the bonuses provided by the aquarium modifier.

Data

  • generation (number) Optional
    • The generation speed multiplier to add to the aquarium. Defaults to 0.0.
  • breed (number) Optional
    • The breed speed multiplier to add to the aquarium. Defaults to 0.0.
  • feed (number) Optional
    • The feed speed multiplier to add to the aquarium. Defaults to 0.0.
  • spread (number) Optional
    • The percent chance for the aquarium modifier to replicate itself to an adjacent block each update cycle (roughly 2.5 seconds). Defaults to 0.0.
  • spread_distance (XYZ) Optional
    • The X, Y, and Z distance for the aquarium modifier to replicate (if spread is greater than 0). Defaults to [0, 0, 0].
  • enable_mob_generators (true|false) Optional
    • Whether the aquarium modifier enables resource generation from axolootls that generate mob resources. Defaults to false.
  • enable_mob_breeding (true|false) Optional
    • Whether the aquarium modifier enables breeding of axolootls that generate mob resources. Defaults to false.
  • energy_cost (number) Optional
    • The Forge Energy to deplete every tick when the aquarium modifier is active. Defaults to 0.
  • greedy_energy (true|false) Optional
    • true to deplete energy into the void, false to transfer energy to the energy handler at the block position (if any) to be handled in some other way. Defaults to false.

JSON Format

The following JSON Aquarium Modifier Settings provides +20% generation speed, +0% breed speed, +100% feed speed, has a 0.25% chance to spread, does not enable mob loot generation, does not enable breeding of mob loot axolootls, and costs 20 Forge Energy per tick.

{
  "generation": 0.2,
  "breed": 0,
  "feed": 1.0,
  "spread": 0.0025,
  "enable_mob_generators": false,
  "enable_mob_breeding": false,
  "energy_cost": 20
}
Clone this wiki locally