Project Red - Exploration

Project Red - Exploration

27M Downloads

How to use PR-Items in Crafting Recipes [Java]

dgsdgsdgsdg opened this issue ยท 12 comments

commented

Hey, I want to know how to use Project-Red items in Crafting Recipes... Would be nice if you answer me, thank you :))

commented

Hmm.. I suppose I can add an API hook for this. Currently, you can only do it with ores and such that are registered in the ore dictionary...

commented

Could you add it? Would be really nice.., Im writing a PR-Addon at the moment and i need items like the Red Alloy Ingot and I wont implement new ones in my mod :))

commented

Well, red alloy ingots are in the ore dictionary as "ingotRedAlloy".

commented

And how Can i add them in a crafting recipe?

commented

Look up how to use ore recipes. There are a ton of tutorials you can use.

commented

Yea, i figured out how to use it, but its not a real solution because I've to use some items that aren't implemented in the ore dictionary, I think using an API hook is an advantage and I would be really happy if you create one :).
PS: I tested the new Project Red Fabrication and its really brilliant :)) Nice work, thats all i've to say :) Keep good working, have a nice day ! :)

commented

Ive the same problem... Would be cool if you implement it :)

commented

Hey... I found a method to use craftting types:
public class pr_items {
public static Item pritem = new mrtjp.projectred.core.ItemPart();
}
But am I able to do it a different way that the items arent registred twice?

commented

DO NOT use other mod's items like that. You can either get the items by name using the method in the Item class. Or just wait until I add it to the API.

commented

How can I get an item by name? xD

commented

@FinalZZ new ItemStack(GameRegistry.findItem("ProjectRed|Core", "projectred.core.part"), size, (short) 10)

The actual instance of Item is shared by many items in PR. The damage value needs to be 10. (Note: I haven't actually tested this, but looking at the Forge and Project Red source, this should be it.)

commented

yeah, heres how to add it: For example the silver ingot:
I changed the modid to z on the first letter and put it into the post init part ;)

ItemStack silver_ingot = new ItemStack(GameRegistry.findItem("ProjRed|Core", "projectred.core.part"), 1, (short) 54);