Jump to content

[Solved] Mod Build Issue


Pitfallingpat

Recommended Posts

(forge-1.11.2-13.20.1.2393 in case this is a version specific issue)

The issue I'm having is now that I feel my mod is finished and I make the jar file and add it to a live version of minecraft (exact same forge version, I made sure of it) I get all sorts of NoSuchMethodErrors like:

Quote

java.lang.NoSuchMethodError: net.minecraft.enchantment.Enchantment.getEnchantmentID(Lnet/minecraft/enchantment/Enchantment;)I

...

java.lang.NoSuchMethodError: net.minecraft.enchantment.Enchantment.setName(Ljava/lang/String;)Lnet/minecraft/enchantment/Enchantment;

...
java.lang.NoSuchMethodError: net.minecraft.entity.EntityLivingBase.getEquipmentAndArmor()Ljava/lang/Iterable;

Only Vanilla functions seem to throw errors, I can get the game to run just fine adding a bunch of null enchantments using the registry system, but the moment I call something non-forge the game crashes.

In my eclipse environment the code runs just fine, it is only in a finished jar of the mod I am getting these issues.

I tried both the "gradlew jar" command and also the built-in eclipse export function, both with the same errors.

So my question is did I mess up with my project setup and how can I fix this?

 

Edit: I know this is kinda hard to explain and debug, I'm just hoping someone else has ran into this exact issue before.

Edited by Pitfallingpat
Link to comment
Share on other sites

You need to build your mod with the build Gradle task, which reobfuscates your code to SRG names after compiling it. These are the names used by Minecraft outside of the development environment.

Edited by Choonster

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.