Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Ore Dictionary Problems
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 1
bcwadsworth

Ore Dictionary Problems

By bcwadsworth, August 14, 2014 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

bcwadsworth    1

bcwadsworth

bcwadsworth    1

  • Tree Puncher
  • bcwadsworth
  • Forge Modder
  • 1
  • 24 posts
Posted August 14, 2014

Hello! I have been trying to register my ore into the ore dictionary. When I try to run minecraft, the following stacktrace for the error appears:

 

 

Stacktrace:

at net.minecraft.item.ItemStack.getItemDamage(ItemStack.java:267)

at net.minecraftforge.oredict.OreDictionary.registerOreImpl(OreDictionary.java:454)

at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:432)

at net.minecraftforge.oredict.OreDictionary.registerOre(OreDictionary.java:431)

at bcwadsworth.bcwadsworthWorld.BcwadsworthWorld.dictRegistration(BcwadsworthWorld.java:168)

at bcwadsworth.bcwadsworthWorld.BcwadsworthWorld.init(BcwadsworthWorld.java:65)

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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)

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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at cpw.mods.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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)

at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:596)

 

 

 

The code I use to register into the dictionary is

OreDictionary.registerOre("oreGemEnd", ORef.oreGemEnd);

ORef is where I keep all the references to my items.

 

I think this is a forge error, but I cannot be certain.

  • Quote

Share this post


Link to post
Share on other sites

shieldbug1    70

shieldbug1

shieldbug1    70

  • Diamond Finder
  • shieldbug1
  • Forge Modder
  • 70
  • 404 posts
Posted August 14, 2014

Ore dictionary has to go in your init method, not your pre-init. This is not a forge bug. I believe it's because registering blocks actually registers an ItemStack, which uses Item.getItemFromBlock which returns null during the Pre-Initialisation stage of Minecraft.

  • Quote

Share this post


Link to post
Share on other sites

bcwadsworth    1

bcwadsworth

bcwadsworth    1

  • Tree Puncher
  • bcwadsworth
  • Forge Modder
  • 1
  • 24 posts
Posted August 14, 2014

My registration to the dictionary goes in init. It is in the correct place unless it needs to go into post-init.

 

EDIT: I tried using ore dictionary in post-init, this gave the same error.

  • Quote

Share this post


Link to post
Share on other sites

shieldbug1    70

shieldbug1

shieldbug1    70

  • Diamond Finder
  • shieldbug1
  • Forge Modder
  • 70
  • 404 posts
Posted August 14, 2014

My bad, I skimmed over the crash log. When do you initialise and register oreGemEnd to the GameRegistry?

  • Quote

Share this post


Link to post
Share on other sites

TehSeph    10

TehSeph

TehSeph    10

  • Stone Miner
  • TehSeph
  • Members
  • 10
  • 56 posts
Posted August 15, 2014

Could we see the ORef file and BcwadsworthWorld.java? It looks like your ItemStack you're registering might be wrong. :)

  • Quote

Share this post


Link to post
Share on other sites

bcwadsworth    1

bcwadsworth

bcwadsworth    1

  • Tree Puncher
  • bcwadsworth
  • Forge Modder
  • 1
  • 24 posts
Posted August 15, 2014

For no apparent reason, the problem has fixed itself! Thanks to all of you who tried!

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • DaemonUmbra
      Forge 28.1.10 won't show on launcher + 28.1.0 fails to work

      By DaemonUmbra · Posted 29 minutes ago

      Where are you looking in the launcher? I suspect you are looking at Profiles/Installations rather than Versions
    • Simon_kungen
      [1.14.4] Sync ItemStack Capability Data + Multi-Capability Provider casting error

      By Simon_kungen · Posted 38 minutes ago

      So yeah... looks like none of my questions has been answered lately. Should I give up on capabilities for now?
    • TheGreenSquarez
      Forge 28.1.10 won't show on launcher + 28.1.0 fails to work

      By TheGreenSquarez · Posted 1 hour ago

      here's the screenshot.
    • TheGreenSquarez
      Forge 28.1.10 won't show on launcher + 28.1.0 fails to work

      By TheGreenSquarez · Posted 1 hour ago

      I'm quite sure it just updated to the latest version.
    • DragonITA
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA · Posted 2 hours ago

      Ok, i want try Something, pls wait.
  • Topics

    • TheGreenSquarez
      4
      Forge 28.1.10 won't show on launcher + 28.1.0 fails to work

      By TheGreenSquarez
      Started Yesterday at 11:21 AM

    • Simon_kungen
      1
      [1.14.4] Sync ItemStack Capability Data + Multi-Capability Provider casting error

      By Simon_kungen
      Started 23 hours ago

    • DragonITA
      33
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA
      Started Monday at 10:06 AM

    • jun2040
      1
      Game crashing when the block is activated

      By jun2040
      Started 2 hours ago

    • Prasodym
      7
      produces unregistered item minecraft:wooden_door

      By Prasodym
      Started April 28

  • Who's Online (See full list)

    • tday93
    • Kharmod
    • Draco18s
    • Simon_kungen
    • ShyAlpha22
    • Legenes
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Ore Dictionary Problems
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community