Posted August 22, 20178 yr (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 August 22, 20178 yr by Pitfallingpat
August 22, 20178 yr 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 August 22, 20178 yr 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.
August 22, 20178 yr Author I feel stupid again, user error on this one. I assumed the "jar" task would also build, I guess I need extremely verbose descriptions of each task. Thank though this was driving me crazy
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.