Jump to content

Recommended Posts

Posted (edited)

I currently have 2 mods, one of which is acting as a library for another. However, once compiled the library's methods seem to be obfuscated, and are unable to be accessed and overridden. For example:


    /**
     * Returns the stack in the given slot.
     */
    @Nullable
    @Override
    public ItemStack func_70301_a(int index) {
        return itemStacks[index];
    }

instead of 

    /**
     * Returns the stack in the given slot.
     */
    @Nullable
    @Override
    public ItemStack getStackInSlot(int index) {
        return itemStacks[index];
    }

Anyone have ideas on how to compile the jar without obfuscation?

Edited by oa10712
Posted

Ok, so by inserting 


task DeobdeobfJar(type: Jar) {
    from sourceSets.main.output
    classifier = 'deobf'
}
 
task DeobsourceJar(type: Jar) {
    from sourceSets.main.allSource
    classifier = 'sources'
}

into my build.gradle, by IDE is now allowing me to build and implement all of the methods. However, now I get Caused by: java.lang.NoClassDefFoundError on a bunch of my files. Any suggestions?

Here is my github repo for the sub-mod: https://github.com/16ColorGames/SuperTechProcessing

and the repo for my library: https://github.com/16ColorGames/SuperTechTweaks

 

Here is a specific case of one of the errors:

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Super Tech Processing (supertechprocessing)
Caused by: java.lang.NoClassDefFoundError: com/sixteencolorgames/supertechprocessing/tileentities/TileEntityElectricExtruder
	at com.sixteencolorgames.supertechprocessing.ModBlocks.init(ModBlocks.java:34)
	at com.sixteencolorgames.supertechprocessing.proxy.CommonProxy.preInit(CommonProxy.java:39)
	at com.sixteencolorgames.supertechprocessing.proxy.ClientProxy.preInit(ClientProxy.java:17)
	at com.sixteencolorgames.supertechprocessing.SuperTechProcessingMod.preInit(SuperTechProcessingMod.java:29)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:618)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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:243)
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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:145)
	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:624)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:259)
	at net.minecraft.client.Minecraft.startGame(Minecraft.java:477)
	at net.minecraft.client.Minecraft.run(Minecraft.java:386)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

 

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.