Posted March 1, 201510 yr So I'm trying to get the Vibrant Alloy from EnderIO to an ItemStack to use it in the recipe for a machine. I've tryed getting it from the GameRegistry, no luck just fire. Now I'm trying to get it from the OreDictionary, still no luck. Here's my code: ItemStack ingotPhasedGold = OreDictionary.getOres("ingotPhasedGold").get(0); If I try that and add the ingotPhasedGold to a recipe or to the machine recipe, I crash. It says that there's no index with "0" but when I try outputing it to the console I get a "1xitem.itemAlloy@2" with I guess it means that the index DOES exist. So I just get a crash when using the OreDictionary with a recipe or when adding it to a machine recipe. What am I doing wrong? http://i.imgur.com/J2keQOC.png[/img]http://i.imgur.com/YHnvIfh.png[/img]
March 1, 201510 yr Please post your full code. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
March 1, 201510 yr Author Here's what I'm trying to do. ItemStack ingotPhasedGold = OreDictionary.getOres("ingotPhasedGold").get(0); //Arguments - name, energy, slot1, slot2, slot3, output EIOHelper.addAlloySmelterRecipe("Potatotato", 16000, ingotPhasedGold, ingotPhasedGold, ingotPhasedGold, Util.toStack(Items.potato)); http://i.imgur.com/J2keQOC.png[/img]http://i.imgur.com/YHnvIfh.png[/img]
March 1, 201510 yr So your game crash on this line? ItemStack ingotPhasedGold = OreDictionary.getOres("ingotPhasedGold").get(0); Then how did you try outputing it to the console? I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
March 1, 201510 yr Author Yes it crashes in that line. Also if I use the "ingotPhasedGold" in a ShapedOreRecipe it works great. Just when I try getting the ores into an ItemStack http://i.imgur.com/J2keQOC.png[/img]http://i.imgur.com/YHnvIfh.png[/img]
March 1, 201510 yr Author Located in my RedstonicRecipes.java in my init function. Here's what's there: public staitic void init(){ if(Loader.isModLoaded("EnderIO")){ ItemStack ingotPhasedGold = OreDictionary.getOres("ingotPhasedGold").get(0); EIOHelper.addAlloySmelterRecipe("Vibrantium", 16000, ingotPhasedGold, ingotPhasedGold, ingotPhasedGold, Util.toStack(Items.potato)); } } Then I call the RedstonicRecipes.init() in my preInit. http://i.imgur.com/J2keQOC.png[/img]http://i.imgur.com/YHnvIfh.png[/img]
March 1, 201510 yr Author ingotPhasedGold is a alloy from EnderIO, here's the class for the alloy. Here's the base class for the alloys. https://github.com/CrazyPants/EnderIO/blob/master/src/main/java/crazypants/enderio/material/Alloy.java On another class it adds the ore to the dictionary by using the oredictIngotName from that class. In this case the oredictIngotName is PhasedGold, so it ends up being ingotPhasedgold. http://i.imgur.com/J2keQOC.png[/img]http://i.imgur.com/YHnvIfh.png[/img]
March 1, 201510 yr Author Well that works, but now that I have my dependencies as dependencies = "after:ThermalExpansion;after:EnderIO" Thermal Expansion crashes with something that has nothing to do with my mod. http://pastebin.com/WiSGBW1u Is it because Im not using a deobf version of EnderIO? Removed Thermal Expansion and everything works great. http://i.imgur.com/J2keQOC.png[/img]http://i.imgur.com/YHnvIfh.png[/img]
March 1, 201510 yr Author Yup that did it. Thank you again! http://i.imgur.com/J2keQOC.png[/img]http://i.imgur.com/YHnvIfh.png[/img]
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.