Jump to content

[1.12]LoaderExeptionModCrash error when registering items.


Geometrically

Recommended Posts

I am updating my mod from 1.7.10 --> 1.12 and I am getting an error in my Item registry class. I could not find the error on the common problems list, but sorry if it is a common error. The error is:

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Prehistoric Eclipse (prehistoriceclipse)
Caused by: java.lang.IncompatibleClassChangeError: com.geometrically.prehistoricEclipse.items.PEItems and com.geometrically.prehistoricEclipse.items.PEItems$RegistrationHandler disagree on InnerClasses attribute
Full Crash log:

---- Minecraft Crash Report ----
// This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]

Time: 2/28/18 8:57 PM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Prehistoric Eclipse (prehistoriceclipse)
Caused by: java.lang.IncompatibleClassChangeError: com.geometrically.prehistoricEclipse.items.PEItems and com.geometrically.prehistoricEclipse.items.PEItems$RegistrationHandler disagree on InnerClasses attribute
	at java.lang.Class.getDeclaringClass0(Native Method)
	at java.lang.Class.getDeclaringClass(Class.java:1235)
	at java.lang.Class.getEnclosingClass(Class.java:1277)
	at java.lang.Class.getSimpleBinaryName(Class.java:1443)
	at java.lang.Class.getSimpleName(Class.java:1309)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.getUniqueName(ASMEventHandler.java:174)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.createWrapper(ASMEventHandler.java:114)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.<init>(ASMEventHandler.java:63)
	at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:130)
	at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:111)
	at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82)
	at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:594)
	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.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:252)
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:230)
	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.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:147)
	at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:570)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:227)
	at net.minecraft.client.Minecraft.init(Minecraft.java:508)
	at net.minecraft.client.Minecraft.run(Minecraft.java:416)
	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)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 1.12
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_121, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 195571392 bytes (186 MB) / 591921152 bytes (564 MB) up to 1860698112 bytes (1774 MB)
	JVM Flags: 0 total; 
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.40 Powered by Forge 14.21.1.2443 6 mods loaded, 6 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
	UC	minecraft{1.12} [Minecraft] (minecraft.jar) 
	UC	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
	UC	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.12-14.21.1.2443.jar) 
	UC	forge{14.21.1.2443} [Minecraft Forge] (forgeSrc-1.12-14.21.1.2443.jar) 
	UE	prehistoriceclipse{beta 3 :D} [Prehistoric Eclipse] (Prehistoric Eclipse 1.12) 
	UC	obsidian_api{1.0.0} [Obsidian API] (ObsidianAPI-1.0.0-deobf.jar) 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 20.19.15.4474' Renderer: 'Intel(R) HD Graphics 4600'

PEItems.java:

public class PEItems {
 //   public static ItemArmor.ArmorMaterial monoArmour = EnumHelper.addArmorMaterial("monoArmour", 1000, new int[]{3,8,6,4}, 30);
    //Items
    public static Item dakoClaw;
    public static Item dakoFeather;
    public static Item dakoMeat;
    public static Item dakoBeef;
    public static Item dakoSkull;
    public static Item hunterBow;
    public static Item dakoArrow;

    public static Item monoHelmet;
    public static Item monoChestplate;
    public static Item monoLeggings;
    public static Item monoBoots;

    public static void init(){

        dakoClaw = new ItemDakotaraptorClaw();
        dakoFeather = new ItemDakotaraptorFeather();
        dakoMeat = new ItemDakotaraptorMeat();
        dakoBeef = new ItemDakotaraptorMeatCooked();
        dakoSkull = new ItemDakotaraptorSkull();
        hunterBow = new ItemHunterBow();
        dakoArrow = new ItemDakotaraptorArrow();

       /* monoHelmet = new ItemMonolophosaurusArmor(monoArmour, 0, 0, "MonolophosaurusHelmet", "prehistoriceclipse:monolophosaurus_helmet");
        monoChestplate = new ItemMonolophosaurusArmor(monoArmour, 0, 1, "MonolophosaurusChestplate", "prehistoriceclipse:monolophosaurus_chestplate");
        monoLeggings = new ItemMonolophosaurusArmor(monoArmour, 0, 2, "MonolophosaurusLeggings", "prehistoriceclipse:monolophosaurus_leggings");
        monoBoots = new ItemMonolophosaurusArmor(monoArmour, 0, 3, "MonolophosaurusBoots", "prehistoriceclipse:monolophosaurus_boots");
        registerItemRecipes();*/
    }
    public static void registerItemRecipes(){
        //Smelting
     /*   GameRegistry.addSmelting(dakoMeat, new ItemStack(dakoBeef), 0.35F);
        //Crafting
        GameRegistry.addShapedRecipe(new ItemStack(dakoArrow), " L ", " S ", " F ", 'F', dakoFeather, 'S', Items.STICK, 'L', Items.flint);
        GameRegistry.addShapedRecipe(new ItemStack(hunterBow), " SV", "B V", " SV", 'V', Blocks.VINE, 'S', Items.STICK, 'B', Items.BONE);*/
    }
   public static void registerRenders(){
      registerRender(dakoClaw);
      registerRender(dakoMeat);
      registerRender(dakoFeather);
      registerRender(dakoBeef);
      registerRender(dakoSkull);
      registerRender(hunterBow);
      registerRender(dakoArrow);

      registerRender(monoHelmet);
      registerRender(monoChestplate);
      registerRender(monoLeggings);
      registerRender(monoBoots);
   }
   public static void register(){
      registerItem(dakoClaw);
      registerItem(dakoMeat);
      registerItem(dakoFeather);
      registerItem(dakoBeef);
      registerItem(dakoSkull);
      registerItem(hunterBow);
      registerItem(dakoArrow);

      registerItem(monoHelmet);
      registerItem(monoChestplate);
      registerItem(monoLeggings);
      registerItem(monoBoots);
   }
   private static void registerItem(Item item){
       ForgeRegistries.ITEMS.register(item);
   }
   private static void registerRender(Item item)
   {
      ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation( "prehistoriceclipse:" + item.getUnlocalizedName().substring(5), "inventory"));
   }
}

What's the problem? Thanks for helping!

Edited by Geometrically
Link to comment
Share on other sites

33 minutes ago, Geometrically said:

private static void registerRender(Item item) {
    ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation( "prehistoriceclipse:" + item.getUnlocalizedName().substring(5), "inventory"));
}

 

I can tell you that this code cannot be here. ModelLoader is client-side only.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Do not use ForgeRegistries for registration. It is only for iterating over.

Forge freezes the BLOCK & ITEM registries during the life-cycle, meaning you cannot edit them after the life-cycle reaches that point.
Use the Register<IForgeRegistryEntry> Events instead. It was made specifically to register these objects.

 

Never use the unlocalized name for anything other than localizing it. It has nothing to do with what the item is.
Use IForgeRegistryEntry::getRegistryName. It has already been formatted to modid:name for you, no need for manually concatenating the modid, nor using the whole substring mess.

Edited by Matryoshika

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Link to comment
Share on other sites

I believe there is a ghost class that isn't shown in the files or the IDE but is still there. I tried deleting the class and it still crashed with the same exact error. How would I fix that?

 

Fixed the crash:

There was a remaining file in the out.production folder. Deleting the project stuff in it fixed the problem with the ghost file. Thanks and I will use the suggestions.

Edited by Geometrically
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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Baba  Serege [[+27-73 590 8989]] has experience of 27 years in helping and guiding many people from all over the world. His psychic abilities may help you answer and resolve many unanswered questions. He specialize in helping women and men from all walks of life.. 1) – Bring back lost lover. even if lost for a long time. 2) – My lover is abusing alcohol, partying and cheating on me I urgently need help” 3) – Divorce or court issues. 4) – Is your love falling apart? 5) – Do you want your love to grow stronger? 6) – Is your partner losing interest in you? 7) – Do you want to catch your partner cheating on you? – We help to keep your partner faithful and loyal to you. 9) – We recover love and happiness when relationship breaks down. 10) – Making your partner loves you alone. 11) – We create loyalty and everlasting love between couples. 12) – Get a divorce settlement quickly from your ex-partner. 13) – We create everlasting love between couples. 14) – We help you look for the best suitable partner. 15) – We bring back lost lover even if lost for a long time. 16) – We strengthen bonds in all love relationship and marriages 17) – Are you an herbalist who wants to get more powers? 18) – Buy a house or car of your dream. 19) – Unfinished jobs by other doctors come to me. 20) – I help those seeking employment. 21) – Pensioners free treatment. 22) – Win business tenders and contracts. 23) – Do you need to recover your lost property? 24) – Promotion at work and better pay. 25) – Do you want to be protected from bad spirits and nightmares? 26) – Financial problems. 27) – Why you can’t keep money or lovers? 28) – Why you have a lot of enemies? 29) – Why you are fired regularly on jobs? 30) – Speed up money claim spell, delayed payments, pension and accident funds 31) – I help students pass their exams/interviews. 33) – Removal of bad luck and debts. 34) – Are struggling to sleep because of a spiritual wife or husband. 35- ) Recover stolen property
    • OLXTOTO adalah situs bandar togel online resmi terbesar dan terpercaya di Indonesia. Bergabunglah dengan OLXTOTO dan nikmati pengalaman bermain togel yang aman dan terjamin. Koleksi toto 4D dan togel toto terlengkap di OLXTOTO membuat para member memiliki pilihan taruhan yang lebih banyak. Sebagai situs togel terpercaya, OLXTOTO menjaga keamanan dan kenyamanan para membernya dengan sistem keamanan terbaik dan enkripsi data. Transaksi yang cepat, aman, dan terpercaya merupakan jaminan dari OLXTOTO. Nikmati layanan situs toto terbaik dari OLXTOTO dengan tampilan yang user-friendly dan mudah digunakan. Layanan pelanggan tersedia 24/7 untuk membantu para member. Bergabunglah dengan OLXTOTO sekarang untuk merasakan pengalaman bermain togel yang menyenangkan dan menguntungkan.
    • Baba  Serege [[+27-73 590 8989]] has experience of 27 years in helping and guiding many people from all over the world. His psychic abilities may help you answer and resolve many unanswered questions. He specialize in helping women and men from all walks of life.. 1) – Bring back lost lover. even if lost for a long time. 2) – My lover is abusing alcohol, partying and cheating on me I urgently need help” 3) – Divorce or court issues. 4) – Is your love falling apart? 5) – Do you want your love to grow stronger? 6) – Is your partner losing interest in you? 7) – Do you want to catch your partner cheating on you? – We help to keep your partner faithful and loyal to you. 9) – We recover love and happiness when relationship breaks down. 10) – Making your partner loves you alone. 11) – We create loyalty and everlasting love between couples. 12) – Get a divorce settlement quickly from your ex-partner. 13) – We create everlasting love between couples. 14) – We help you look for the best suitable partner. 15) – We bring back lost lover even if lost for a long time. 16) – We strengthen bonds in all love relationship and marriages 17) – Are you an herbalist who wants to get more powers? 18) – Buy a house or car of your dream. 19) – Unfinished jobs by other doctors come to me. 20) – I help those seeking employment. 21) – Pensioners free treatment. 22) – Win business tenders and contracts. 23) – Do you need to recover your lost property? 24) – Promotion at work and better pay. 25) – Do you want to be protected from bad spirits and nightmares? 26) – Financial problems. 27) – Why you can’t keep money or lovers? 28) – Why you have a lot of enemies? 29) – Why you are fired regularly on jobs? 30) – Speed up money claim spell, delayed payments, pension and accident funds 31) – I help students pass their exams/interviews. 33) – Removal of bad luck and debts. 34) – Are struggling to sleep because of a spiritual wife or husband. 35- ) Recover stolen property
    • BD303 merupakan salah satu situs slot mudah scatter paling populer dan digemari oleh kalangan slot online di tahun 2024 mainkan sekarang dengan kesempatan yang mudah menang jackpot jutaan rupiah.
  • Topics

×
×
  • Create New...

Important Information

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