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 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

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.