Jump to content

Shapeless Recipes using the Ore Dictionary


tyrael142

Recommended Posts

I'm really new to coding. Just started 2 days ago and ran across something that i can't figure out. I did a search on the forums and there are many about using GameRegistry.addShapelessRecipe but what i am looking it is the ability to use ingots/ores from other mods from the Ore Dictionary through CraftManager instead. Here is the code snippet that is causing my errors.

 

CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(TutorialMain.ingotBronze, true, new Object[]{
  ingotCopper, ingotCopper, ingotCopper, ingotTin,
          }));

 

2013-01-06 22:43:18 [iNFO] [sTDERR] java.lang.RuntimeException: Invalid shapeless ore recipe: true, [Ljava.lang.Object;@2324279c, 1xitem.Bronze Ingot@0
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at net.minecraftforge.oredict.ShapelessOreRecipe.<init>(ShapelessOreRecipe.java:55)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at net.minecraftforge.oredict.ShapelessOreRecipe.<init>(ShapelessOreRecipe.java:24)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at tyrael142.tutorial.common.TutorialMain.init(TutorialMain.java:125)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:483)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:656)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:207)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.startGame(Minecraft.java:456)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.run(Minecraft.java:744)
2013-01-06 22:43:18 [iNFO] [sTDERR] 	at java.lang.Thread.run(Unknown Source)
2013-01-06 22:43:39 [iNFO] [sTDERR] Someone is closing me!

 

i've tried adding TutorialMain (whether it would help or not i have no clue) and still received the exact same error so at this point i'm lost and in need of some help  :o

Link to comment
Share on other sites

if you wanna do that you need the soucre folder of a mods that have copper, tin and bronze

 

 

i'm also looking for a script for dye i mades a whitedye instead of bone meal but the "white dye" need the same props as the bone meal and i don't know how i have to do that

Link to comment
Share on other sites

If that's true then i'll just make them for my mod right now. Only reason i ask is because if i use the same Manager to make a shaped recipe, i can use other mod's ingots/ores in my recipes because of the Ore Dictionary. Maybe it doesn't work with shapeless. Thanks for saving me for racking my brains for a few more hours ;)

 

EDIT: Nvm I figured it out. I needed to add the new Itemstack and remove the boolean. Works like a charm ;)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

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