Jump to content

Recommended Posts

Posted (edited)

So recently I updated my mod and when I tried to start it, I got this crash:

  Reveal hidden contents

 

Before it was working perfectly (and I didn't even change anything inside the classes it's pointing to)

 

Since it's pointing to my RegistryHandler class, there's the class:

  Reveal hidden contents

 

I checked the .jar file if there are all classes which should and nothing seems to be missing. I tried to do some research but didn't find solution. Also maybe is it cause because I'm using old forge? (1.12.2 mc, 14.23.4.2705 forge)

Edited by Toma™
solved
Posted

Your issue is likely caused by something else somewhere else but since you are using static initializers everything gets messed up and you see this error report. One more reason to stop using static initializers.

Also don't use IHasModel. It is stupid. Every item needs a model. Every single one. And nothing required for model registering is private.

Also these

  On 10/5/2018 at 2:52 PM, Toma™ said:

        MinecraftForge.EVENT_BUS.register(new ClientTickEvents());

Expand  

 

  On 10/5/2018 at 2:52 PM, Toma™ said:

 public static void registerKeyBinding()
    {
        ClientRegistry.registerKeyBinding(KeyBinds.RELOAD);
        ClientRegistry.registerKeyBinding(KeyBinds.FIREMODE);
    }
    

Expand  

Should be in your client proxy, not a common class.

 

  On 10/5/2018 at 2:52 PM, Toma™ said:

GameRegistry.registerTileEntity(TileEntityAirdrop.class, Reference.MOD_ID + ":airdrop");
        GameRegistry.registerTileEntity(TileEntityLamp.class, Reference.MOD_ID + ":lamp");
        GameRegistry.registerTileEntity(TileEntityLootSpawner.class, Reference.MOD_ID + ":lootspawner");

Expand  

Stop using a deprecated method. Use the overload which takes a ResourceLocation.

 

As for the actual issue - it's impossible to tell from the information you've provided. Please provide a link to your github repository so I can test it locally and trace the actual issue.

Or simply stop using static initializers. In this case the acual issue will be the one you catch.

Posted

Actually, one is package (the lowercase one) where are classes (the block class - upper case one and when I started modding, I wasn't doing block classes like BlockXxxx, but I simply used to put the name of it there).

Looking into it now, I see only package and class name, but maybe eclipse is getting confused by that - it's changed now

Posted
  On 10/5/2018 at 3:24 PM, Toma™ said:

Actually, one is package (the lowercase one) where are classes (the block class - upper case one and when I started modding, I wasn't doing block classes like BlockXxxx, but I simply used to put the name of it there).

Expand  

2packages.PNG.6a23c0b2c4567ab564213be9e32ee588.PNG

 

And in the .jar file the upper-case turns into lower-case which leads to duplicate files which leads to the inability to load the duplicated class. In my local environment as soon as I dealt with the duplicated package/classes(and a few other compilation issues) I was able to boot the game just fine.

Posted

oh I see. That's caused because last time I was uploading whole main folder to GitHub I had the package named with uppercase A, but in latest update I changed it to all lower case characters and since I was uploading new files and not replacing the old ones, it kept both folders. But in my eclipse I have only 1 package named airdrop. 

I'm able to load it in IDE too, but as soon as I export the mod (using the gradlew build obviously) I get the crash report I posted above. Maybe there are some references to the old package name which didn't get replaced or I don't know

Posted

I am able to launch your mod in a normal(non-dev) environment. There were a few compile errors I had to correct though and one of your classes was referencing the upper-case package.

  On 10/5/2018 at 3:50 PM, Toma™ said:

oh I see. That's caused because last time I was uploading whole main folder to GitHub I had the package named with uppercase A, but in latest update I changed it to all lower case characters and since I was uploading new files and not replacing the old ones, it kept both folders.

Expand  

Use github integration instead of uploading files manually. Or at least the command line git client.

Posted
  On 10/5/2018 at 4:19 PM, V0idWa1k3r said:

I am able to launch your mod in a normal(non-dev) environment. There were a few compile errors I had to correct though and one of your classes was referencing the upper-case package.

Use github integration instead of uploading files manually. Or at least the command line git client.

Expand  

 

Alright, I'll try to change some stuff you suggested me above and build the mod and try it. Thanks for your time and 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.