Skip to content

Axolootl Breeding Modifier

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

Overview

The Axolootl Breeding Modifier provides a way to modify existing Axolootl Breeding Recipes without replacing the file. This allows multiple data packs to add or remove offspring from an existing recipe.

Usage

Create a JSON file located at data/[namespace]/axolootl/breeding_modifiers/[path].json where [namespace]:[path] is the ID of the Axolootl Breeding Modifier. Names must be lowercase and contain no spaces. For readability purposes, please include the name of the target Axolootl Breeding Recipe in the name of the file.

Axolootl Breeding Modifiers are applied in this order:

  1. PRE (not implemented)
  2. ADD (breeding modifiers add entries to existing breeding recipes)
  3. REMOVE (breeding modifiers remove entries from existing breeding recipes)
  4. POST (not implemented)

Data

  • type (namespaced ID) Required
    • The registry ID of the Axolootl Breeding Modifier type
  • target (namespaced ID) Required

Add Axolootl Breeding Modifier

Injects one or more weighted entries into the result pool for a given Axolootl Breeding Recipe.

Data

  • values (Weighted Entry|Weighted List) Required
    • A single weighted entry or a list of weighted entries to inject.

JSON Format

The following Axolootl Breeding Modifier injects Lapis axolootl and Slime axolootl into the breeding recipe at data/axolootl/axolootl/breeding/basic_and_basic.json

{
  "type": "axolootl:add",
  "target": "axolootl:basic_and_basic",
  "values": [
    {
      "weight": 3,
      "data": "axolootl:lapis"
    },
    {
      "weight": 1,
      "data": "axolootl:slime"
    }
  ]
}

The following Axolootl Breeding Modifier injects Obsidian axolootl into the breeding recipe at data/axolootl/axolootl/breeding/stone_and_bone.json

{
  "type": "axolootl:add",
  "target": "axolootl:stone_and_bone",
  "values": {
    "weight": 2,
    "data": "axolootl:obsidian"
  }
}

Remove Axolootl Breeding Modifier

Removes one or more weighted entries from the result pool for a given Axolootl Breeding Recipe.

Data

Weighted Entry Predicate

Matches one or more weighted entries in a weighted list.

Data

There are two ways to define a Weighted Entry Predicate

  1. A string that is compared to the Axolootl Variant ID
  • The variant wildcard "[namespace]:*" matches any variants with the namespace [namespace]
  • The namespace wildcard "*:[variant]" matches variants with the path [variant] in any namespace
  • The wildcard "*" or "*:*" matches everything
  1. A string that follows the rules above and/or a Min Max Bounds to match the weight
  • variant (string) Optional
    • The variant(s) to match. Defaults to the wildcard "*"
  • weight (number|Min Max Bounds) Optional
    • The weight of a weighted entry to match.

JSON Format

The following Axolootl Breeding Modifier removes the Oak axolootl from the breeding recipe at data/axolootl/axolootl/breeding/basic_and_basic.json

{
  "type": "axolootl:remove",
  "target": "axolootl:basic_and_basic",
  "predicate": "axolootl:wood/oak"
}

The following Axolootl Breeding Modifier removes all axolootls in the axolootl namespace and with a weight between 1 and 20 (inclusive) from the breeding recipe at data/axolootl/axolootl/breeding/dirt_and_dirt.json

{
  "type": "axolootl:remove",
  "target": "axolootl:dirt_and_dirt",
  "predicate": {
    "variant": "axolootl:*",
    "weight": {
      "min": 1,
      "max": 20
    }
  }
}

Sequence Axolootl Breeding Modifier

Combines the Add and Remove Breeding Modifiers to modify multiple entries in a given Axolootl Breeding Recipe.

Data

JSON Format

The following Axolootl Breeding Modifier adds Slime axolootl, then removes Zombie axolootl and Creeper axolootl from the breeding recipe at data/[namespace]/axolootl/breeding/bone_and_bone.json for any namespace

{
  "type": "axolootl:sequence",
  "target": "*:bone_and_bone",
  "add": [
    {
      "weight": 2,
      "data": "axolootl:slime"
    }
  ],
  "remove": [
    "axolootl:zombie",
    "axolootl:creeper"
  ]
}