Posted April 21, 20178 yr I want to use Thermal Foundation's ingots as a recipe output in my mod. How can I do this?
April 21, 20178 yr Author 1 minute ago, diesieben07 said: You can get any item or block by name by using ForgeRegistries.ITEMS.getValue resp. ForgeRegistries.BLOCKS.getValue. However with ingots you might want to use the OreDicitionary instead. I can't for some parts, like a recipe cant result in a oredict.
April 21, 20178 yr Author So how do I get my recipes to result in thermalfoundation items? And how do I use ForgeRegistries.ITEMS.getValue() In postinit? And how do I get the modname and the item name?
April 21, 20178 yr 1 hour ago, jawsawn said: And how do I get the modname and the item name? Try running Minecraft with the mod installed. Watch the console (or read the log afterward). There should be loads of loader info in there. Turn on in-game debugging (F3 in my version) and examine items/blocks. You should also peak inside the mod's JAR file. Even if the java source isn't in there, you should still be able to see all of its resources such as the language file(s) and blockstates files etc. You can learn a LOT from those. This is Minecraft; learn to dig The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
April 27, 20178 yr Author Well you guys weren't that helpful, I have figured it out for future references: if (Loader.isModLoaded("thermalfoundation")) {GameRegistry.addRecipe( new ShapelessOreRecipe(new ItemStack(Item.getByNameOrId("thermalfoundation:material"),2,132),"ingotIron")); }
April 27, 20178 yr That's essentially what diesieben07 told you to do, except you're using the vanilla method instead of the Forge method. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
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.