Jump to content

[1.8][SOLVED] Crash on built mod, runs fine in Eclipse


Recommended Posts

Posted

When building my mod with Forge 1.8 Build 1273 I'm getting this AbstractMethodError crash when trying to use the mod in normal minecraft. Both my enviroments are with Forge Build 1273 and the mod runs fine within Eclipse.

 

Sourcecode of EnumOrganicLayer.java

 

Exception:

 

 

net.minecraftforge.fml.common.LoaderException: java.lang.AbstractMethodError: at.tyron.vintagecraft.World.EnumOrganicLayer.getName()Ljava/lang/String;

at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:162)

at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:693)

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:291)

at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:484)

at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:325)

at net.minecraft.client.main.Main.main(SourceFile:120)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Caused by: java.lang.AbstractMethodError: at.tyron.vintagecraft.World.EnumOrganicLayer.getName()Ljava/lang/String;

at at.tyron.vintagecraft.block.VCBlock.registerMultiState(VCBlock.java:30)

at at.tyron.vintagecraft.block.VCBlocks.initBlocks(VCBlocks.java:59)

at at.tyron.vintagecraft.block.VCBlocks.init(VCBlocks.java:52)

at at.tyron.vintagecraft.VintageCraft.init(VintageCraft.java:101)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:692)

... 10 more

 

 

Posted

The problem is that your

IEnumState

interface has a

getName

method, which Minecraft's

IStringSerializable

has as well. Because

IStringSerializable

is a Minecraft class, it has obfuscated names outside the development environment, so

getName

is not actually called

getName

outside of eclipse. Because

EnumOrganicLayer

implements

IStringSerializable

, it's

getName

is renamed to what Minecraft's

getName

is actually called when you build your mod ("reobfuscating"). But the

getName

method of

IEnumState

is not renamed of course, so

EnumOrganicLayer

has a missing method at runtime.

 

Wow ok, you're a genius, anybody mentioned that already? ;-)

Thank you for your help!

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.