Closed A5ho9999 closed 1 year ago
Do you have a github repository with the source code of your mod? The error you're mentioning doesn't say anything to debug.
the mod is currently unreleased. Here is the current code related to the Axolotl's
https://gist.github.com/A5ho9999/28acf3c4202117882096c2d589f09dca
Where is LoadVariants() called? It should be called in the mod's onInitialize (fabric) or the main mod class if forge.
It is called within the onInitialize. The original call is ModEntities.registerModEntities();
which leads to CottageAxolotls.LoadVariants();
Well, i'm sending you a working template mod so you can see how to do it correctly. Axolotl Example Mod Template.zip Hope you can figure out why is not working, as we cannot access to the source code we can't tell if you're using the right api version or if the project is broken somehow.
I've looked over the template and there is only really one difference I was able to find
ModdedAxolotlVariant.Builder builder = ModdedAxolotlVariant.register(new ResourceLocation(AxolotlExampleMod.MOD_ID, variant.getName()));
ResourceLocation doesn't seem to exist, here are the versioning
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.9
loader_version=0.14.21
# https://modrinth.com/mod/mavapi/versions
mavapi_version=1.1.1-mc1.20
plugins {
id 'fabric-loom' version '1.3-SNAPSHOT'
id 'maven-publish'
}
it doesn't "exists" because you're using yarn mappings instead of mojmaps (mojang mappings)
I can't reproduce the crash you're having, therefore i'd suggest you using the template as a base for your mod, and switch to mojang mappings as it's the official Minecraft mappings. If there are further issues, you could upload the project's source code but make the repository private (it's free!) and give access to us (KxmischesDomi and I) so we can provide a better resolution of the issue.
Yes I realised that the mappings didn't match so am currently in the process of switching everything over, but will take awhile before I am able to check again. Hopefully changing that will be enough. Thank you
there's a gradle command for migrate mappings https://fabricmc.net/wiki/tutorial:migratemappings to switch to mojang mappings you only have to run this command gradlew migrateMappings --mappings net.minecraft:mappings:1.20.1
it will put the remapped files into a folder called "remappedSrc"
Closing issue.
Game crashes when trying to add a Variant (Fabric 1.20.1), not too sure what do here.