Jump to content

Recommended Posts

Posted

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?

Posted

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.

Posted

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.

Posted

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.

Posted

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.

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.