Posted June 8, 201510 yr I want to make it so that you can craft any potion with any piece of my custom armor (8 variants from 1 class) and create a new instance of the armor based on the item in the crafting inventory. I want them to be able to craft any of the 8 possible variants of armor with any vanilla potion and have the recipe output be a new ItemStack using the potion constructor. But how would I get which potion is in the crafting? Default constructor for armor: public ItemArmorObsidian(int type, boolean reinforced) { super(ItemRegistry.armorObsidianReinforced, 0, type); this.reinforced = reinforced; this.type = type; setName(type, reinforced); } Constructor when potion available: public ItemArmorObsidian(int type, boolean reinforced, Potion potion) { super(ItemRegistry.armorObsidianReinforced, 0, type); this.type = type; this.reinforced = reinforced; this.potion = potion; setName(type, reinforced); }
June 8, 201510 yr Use IRecipe for that. You can make your IRecipe consume any piece of the custom armor and any potion, and give the potion-ed armor. After creating the recipe, register the recipe with GameRegistry#addRecipe(IRecipe). EDIT: Also giving potion as parameter in constructor would be no use. Instead save the potion id to the NBT of the armor, and get the Potion instance from Potion class whenever you want. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
June 8, 201510 yr Author Do you have any info on implementing IRecipe? I can't find any useful information anywhere.
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.