-
Notifications
You must be signed in to change notification settings - Fork 0
Axolootl Breeding Modifier
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.
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:
-
PRE
(not implemented) -
ADD
(breeding modifiers add entries to existing breeding recipes) -
REMOVE
(breeding modifiers remove entries from existing breeding recipes) -
POST
(not implemented)
-
type
(namespaced ID) Required- The registry ID of the Axolootl Breeding Modifier type
-
target
(namespaced ID) Required- The ID of the Axolootl Breeding to modify
Injects one or more weighted entries into the result pool for a given Axolootl Breeding Recipe.
-
values
(Weighted Entry|Weighted List) Required- A single weighted entry or a list of weighted entries to inject.
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"
}
}
Removes one or more weighted entries from the result pool for a given Axolootl Breeding Recipe.
-
predicate
(Weighted Entry Predicate) Required- Determines which weighted entry or entries to remove
Matches one or more weighted entries in a weighted list.
There are two ways to define a Weighted Entry Predicate
- 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
- 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
"*"
- The variant(s) to match. Defaults to the wildcard
-
weight
(number|Min Max Bounds) Optional- The weight of a weighted entry to match.
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
}
}
}
Combines the Add and Remove Breeding Modifiers to modify multiple entries in a given Axolootl Breeding Recipe.
-
add
(Weighted Entry|Weighted List) Optional- A single entry or list of weighted entries to inject into the target breeding recipe
-
remove
(Weighted Entry Predicate|Weighted Entry Predicate List) Optional- A single predicate or list of predicates to remove entries from the target breeding recipe
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"
]
}