Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft

More Axolotl Variants API FAQ

10 questions players actually ask, answered.

How do I summon a custom axolotl variant with a command?
Use /summon minecraft:axolotl ~ ~ ~ {Variant:"yourmodid:yourvariantname"}, replacing the identifier with the variant you registered. The variant field now takes a namespaced string instead of a number.
Why does my old axolotl summon command with a number no longer work?
This mod changes the Variant field from an integer to a resource location string, so numeric values are no longer valid. Use the identifier form like "minecraft:lucy" instead.
How do I register a new axolotl variant in my own mod?
Call ModdedAxolotlVariant.register(new ResourceLocation("yourmodid", "yourvariantname")).natural().build() for a normal variant, or drop the .natural() call to make it breeding-only. Run this during your mod's initialization.
What's the difference between a natural variant and a breeding-only variant?
Natural variants can spawn in the world on their own, while breeding-only variants only appear when bred from other axolotls. Add .natural() to the builder chain to make a variant spawn naturally.
How do I find the identifier for a specific axolotl variant?
Identifiers follow the format namespace:path, like minecraft:lucy for vanilla variants or yourmodid:yourvariantname for modded ones. Check the mod or datapack that registered the variant for its exact identifier.
Can I summon vanilla axolotl variants with this mod installed?
Yes, vanilla variants are still available using their identifier form such as minecraft:lucy, minecraft:wild, and so on. The mod converts the existing variants to the tag-based system.
My custom variant doesn't spawn naturally — what did I do wrong?
You likely forgot to add .natural() to the builder chain, which makes the variant breeding-only. Add .natural() before .build() to allow natural spawning.
Do I need to register my variant on both client and server?
Registration should happen during common mod initialization so both sides know about the variant. If you only register on one side, the variant may not display or summon correctly.
Will this mod conflict with other mods that add axolotl variants?
It generally works alongside other mods as long as each variant uses a unique namespaced identifier. Two mods registering the same identifier will conflict, so use your own mod ID as the namespace.
Does adding many axolotl variants hurt performance?
Registering variants is lightweight since it only adds entries to a registry, not new entities. Performance impact is negligible unless a huge number of axolotls are spawning at once.