Posted August 14, 201411 yr Consider the following code: List<ItemStack> potion_subtypes = new ArrayList<ItemStack>(); Items.potionitem.getSubItems(Items.potionitem, null, potion_subtypes); for (ItemStack is : potion_subtypes) { System.out.println(is.getUnlocalizedName() + " =>" + is.getDisplayName()); } It prints the following: item.potion =>Water Bottle item.potion =>Potion of Regeneration item.potion =>Potion of Regeneration item.potion =>Potion of Regeneration item.potion =>Splash Potion of Regeneration item.potion =>Splash Potion of Regeneration item.potion =>Splash Potion of Regeneration item.potion =>Potion of Swiftness item.potion =>Potion of Swiftness item.potion =>Potion of Swiftness item.potion =>Splash Potion of Swiftness item.potion =>Splash Potion of Swiftness item.potion =>Splash Potion of Swiftness item.potion =>Potion of Fire Resistance item.potion =>Potion of Fire Resistance item.potion =>Splash Potion of Fire Resistance item.potion =>Splash Potion of Fire Resistance item.potion =>Potion of Poison item.potion =>Potion of Poison item.potion =>Potion of Poison item.potion =>Splash Potion of Poison item.potion =>Splash Potion of Poison item.potion =>Splash Potion of Poison item.potion =>Potion of Healing item.potion =>Potion of Healing item.potion =>Splash Potion of Healing item.potion =>Splash Potion of Healing item.potion =>Potion of Night Vision item.potion =>Potion of Night Vision item.potion =>Splash Potion of Night Vision item.potion =>Splash Potion of Night Vision item.potion =>Potion of Weakness item.potion =>Potion of Weakness item.potion =>Splash Potion of Weakness item.potion =>Splash Potion of Weakness item.potion =>Potion of Strength item.potion =>Potion of Strength item.potion =>Potion of Strength item.potion =>Splash Potion of Strength item.potion =>Splash Potion of Strength item.potion =>Splash Potion of Strength item.potion =>Potion of Slowness item.potion =>Potion of Slowness item.potion =>Splash Potion of Slowness item.potion =>Splash Potion of Slowness item.potion =>Potion of Harming item.potion =>Potion of Harming item.potion =>Splash Potion of Harming item.potion =>Splash Potion of Harming item.potion =>Potion of Water Breathing item.potion =>Potion of Water Breathing item.potion =>Splash Potion of Water Breathing item.potion =>Splash Potion of Water Breathing item.potion =>Potion of Invisibility item.potion =>Potion of Invisibility item.potion =>Splash Potion of Invisibility item.potion =>Splash Potion of Invisibility How come awkward potions, mundane potions and clear potions aren't listed? How do I get a list of the subtypes that include those? Also, how do I get a list of the potions' crafting recipes? I like trains.
August 15, 201411 yr subtypes for potions are computed and cached when asked for. Then only the effective potions (those with a list of effects) actually get returned. Awkward, mundane, milky, stinky, etc. etc. are not effective and therefore not sub-listed. Those other names are seemingly random based on whatever potion id (damage value) is requested. Tip: Study net.minecraft.potion.PotionHelper to discover why. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
August 16, 201411 yr Author That's going to be a bit of a problem because I want to get all the potions and their recipes even if they're not really used. I don't see what I'm supposed to be seeing in PotionHelper. I like trains.
August 16, 201411 yr It's all right there. It is very complicated, so I don't imagine a beginner will understand how it works. Sorry I cannot spell it out for you. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
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.