Posted April 16, 20169 yr So i have some custom armor in my mod, I would like to add potions of a certain type to that recipe, for example the 1 helmet gives you night vision, so i'd like the helmet to be crafted with a night vision potion, I've tried looking around but couldn't find any 1.9 tutorials for this. I know how to do recipes, just not sure on adding potions to it. My current line is below for one of my helmets. GameRegistry.addRecipe(new ItemStack(SlurpiesDonglesItems.topaz_helmet), " ", "TPT", "TRT", 'T', SlurpiesDonglesItems.hardened_topaz, 'R', SlurpiesDonglesItems.ruby_helmet, 'P', ***); Where the ***'s are after the p at the end, is what i am not sure of what to put there to make the P in the quotes, know that it's supposed to be a Night Vision potion. If anyone could help me, i'd appreciate it, thank you.
April 16, 20169 yr You can create and pass an ItemStack as an argument. I think it would be something like NBTTagCompound nbt = new NBTTagCompound(); nbt.setString("Potion", "minecraft:night_vision"); ItemStack potion = new ItemStack(Items.potion); potion.setTagCompound(nbt); May be a couple of mistakes there, but I am sure you can fix any.
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.