Creative Menu potion values are not the same as when brewed (issue redo)
(Note - I already reported this issue, but made the mistake of saying it was a duplicate of MC-1517. It's related to that issue but doesn't really duplicate it, also my issue provides a lot more information about the problem.)
ISSUE:
When you take a Potion from the Creative Menu brewing tab, its numeric value is larger than it should be. The bits that don't have to do with the potion effect requirements are all set to 1.
This doesn't seem to affect using the Potions, but since some of the bits set to 1 control whether you can add more ingredients, you can do some odd brewings.
I've also noticed that the potions used by the Witch use the larger "creative menu" potion values instead of their brewed potion values. It'd be good to fix that as well.
HOW TO CONFIRM:
1) Get a 3-minute Potion of Fire Resistance from the Creative Menu.
2) Put it in a Brewing Stand.
3) Add a Ghast Tear.
WHAT I EXPECT:
Nothing happens. Ghast Tear shouldn't brew with a finished potion.
WHAT I GET:
It brews a 22-second Potion of Regen II.
LIKELY CAUSE & FIX:
I took a look at (MCP)ItemPotion.getSubItems(), which generates the set of Potion items for the brewing tab. Currently it loops through the possible values 0 - 32767, adding values that create potions to a List indexed by the potion effect. This means that, if more than one potion value produces the same effect, the list will end up with the largest potion value for that particular effect - hence all the "don't-care" bits are set.
I've attached a piece of code for you to try in (MCP)ItemPotion.getSubItems(). It will account for missing Healing/Harming potions and use the smallest value for each potion effect.
Environment
Windows XP (x86) version 5.1, Java 1.6.0_31
Created Issue:
Creative Menu potion values are not the same as when brewed (issue redo)
ISSUE:
When you take a Potion from the Creative Menu brewing tab, its numeric value is larger than it should be. The bits that don't have to do with the potion effect requirements are all set to 1.
This doesn't seem to affect using the Potions, but since some of the bits set to 1 control whether you can add more ingredients, you can do some odd brewings.
For example, try taking a 3-minute Potion of Fire Resistance from the Creative Menu, putting it in a Brewing Stand, and adding a Ghast Tear. It will brew into a 22-second Potion of Regen II.
LIKELY CAUSE & FIX:
I took a look at (MCP)ItemPotion.getSubItems(), which generates the set of Potion items for the brewing tab. Currently it loops through the possible values 0 - 32767, adding values that create potions to a List indexed by the potion effect. This means that, if more than one potion value produces the same effect, the list will end up with the largest potion value for that particular effect - hence all the "don't-care" bits are set.
A quick fix? Try looping from 32767 to 0 so you get the smallest potion value for each effect. Note that this may cause other problems if some bits aren't set, so it'll take some checking.
EDIT:
I've attached a piece of code for you to try in (MCP)ItemPotion.getSubItems(). It will account for missing Healing/Harming potions and use the smallest value for each potion effect.Environment
Windows XP (x86) version 5.1, Java 1.6.0_31
(Note - I already reported this issue, but made the mistake of saying it was a duplicate of
MC-1517ISSUE:
When you take a Potion from the Creative Menu brewing tab, its numeric value is larger than it should be. The bits that don't have to do with the potion effect requirements are all set to 1.
This doesn't seem to affect using the Potions, but since some of the bits set to 1 control whether you can add more ingredients, you can do some odd brewings.
For example, try taking a 3-minute Potion of Fire Resistance from the Creative Menu, putting it in a Brewing Stand, and adding a Ghast Tear. It will brew into a 22-second Potion of Regen II.
LIKELY CAUSE & FIX:
I took a look at (MCP)ItemPotion.getSubItems(), which generates the set of Potion items for the brewing tab. Currently it loops through the possible values 0 - 32767, adding values that create potions to a List indexed by the potion effect. This means that, if more than one potion value produces the same effect, the list will end up with the largest potion value for that particular effect - hence all the "don't-care" bits are set.
A quick fix? Try looping from 32767 to 0 so you get the smallest potion value for each effect. Note that this may cause other problems if some bits aren't set, so it'll take some checking.
EDIT:
I've attached a piece of code for you to try in (MCP)ItemPotion.getSubItems(). It will account for missing Healing/Harming potions and use the smallest value for each potion effect.
(Note - I already reported this issue, but made the mistake of saying it was a duplicate of
MC-1517ISSUE:
When you take a Potion from the Creative Menu brewing tab, its numeric value is larger than it should be. The bits that don't have to do with the potion effect requirements are all set to 1.
This doesn't seem to affect using the Potions, but since some of the bits set to 1 control whether you can add more ingredients, you can do some odd brewings.
For example, try taking a 3-minute Potion of Fire Resistance from the Creative Menu, putting it in a Brewing Stand, and adding a Ghast Tear. It will brew into a 22-second Potion of Regen II.
LIKELY CAUSE & FIX:
I took a look at (MCP)ItemPotion.getSubItems(), which generates the set of Potion items for the brewing tab. Currently it loops through the possible values 0 - 32767, adding values that create potions to a List indexed by the potion effect. This means that, if more than one potion value produces the same effect, the list will end up with the largest potion value for that particular effect - hence all the "don't-care" bits are set.
A quick fix? Try looping from 32767 to 0 so you get the smallest potion value for each effect. Note that this may cause other problems if some bits aren't set, so it'll take some checking.EDIT:
I've attached a piece of code for you to try in (MCP)ItemPotion.getSubItems(). It will account for missing Healing/Harming potions and use the smallest value for each potion effect.(Note - I already reported this issue, but made the mistake of saying it was a duplicate of
MC-1517. It's related to that issue but doesn't really duplicate it, also my issue provides a lot more information about the problem.)ISSUE:
When you take a Potion from the Creative Menu brewing tab, its numeric value is larger than it should be. The bits that don't have to do with the potion effect requirements are all set to 1.
This doesn't seem to affect using the Potions, but since some of the bits set to 1 control whether you can add more ingredients, you can do some odd brewings.
For example, try taking a 3-minute Potion of Fire Resistance from the Creative Menu, putting it in a Brewing Stand, and adding a Ghast Tear. It will brew into a 22-second Potion of Regen II.
I've also noticed that the potions used by the Witch use the larger "creative menu" potion values instead of their brewed potion values. It'd be good to fix that as well.
LIKELY CAUSE & FIX:
I took a look at (MCP)ItemPotion.getSubItems(), which generates the set of Potion items for the brewing tab. Currently it loops through the possible values 0 - 32767, adding values that create potions to a List indexed by the potion effect. This means that, if more than one potion value produces the same effect, the list will end up with the largest potion value for that particular effect - hence all the "don't-care" bits are set.
I've attached a piece of code for you to try in (MCP)ItemPotion.getSubItems(). It will account for missing Healing/Harming potions and use the smallest value for each potion effect.
is duplicated by
duplicates
(Note - I already reported this issue, but made the mistake of saying it was a duplicate of
MC-1517. It's related to that issue but doesn't really duplicate it, also my issue provides a lot more information about the problem.)ISSUE:
When you take a Potion from the Creative Menu brewing tab, its numeric value is larger than it should be. The bits that don't have to do with the potion effect requirements are all set to 1.
This doesn't seem to affect using the Potions, but since some of the bits set to 1 control whether you can add more ingredients, you can do some odd brewings.
For example, try taking a 3-minutePotionof Fire Resistance from the CreativeMenu,putting it in a Brewing Stand, and adding a Ghast Tear. It will brew into a 22-second Potion of Regen II.I've also noticed that the potions used by the Witch use the larger "creative menu" potion values instead of their brewed potion values. It'd be good to fix that as well.
LIKELY CAUSE & FIX:
I took a look at (MCP)ItemPotion.getSubItems(), which generates the set of Potion items for the brewing tab. Currently it loops through the possible values 0 - 32767, adding values that create potions to a List indexed by the potion effect. This means that, if more than one potion value produces the same effect, the list will end up with the largest potion value for that particular effect - hence all the "don't-care" bits are set.
I've attached a piece of code for you to try in (MCP)ItemPotion.getSubItems(). It will account for missing Healing/Harming potions and use the smallest value for each potion effect.
(Note - I already reported this issue, but made the mistake of saying it was a duplicate of
MC-1517. It's related to that issue but doesn't really duplicate it, also my issue provides a lot more information about the problem.)ISSUE:
When you take a Potion from the Creative Menu brewing tab, its numeric value is larger than it should be. The bits that don't have to do with the potion effect requirements are all set to 1.
This doesn't seem to affect using the Potions, but since some of the bits set to 1 control whether you can add more ingredients, you can do some odd brewings.
I've also noticed that the potions used by the Witch use the larger "creative menu" potion values instead of their brewed potion values. It'd be good to fix that as well.
HOW TO CONFIRM:
1) Get a 3-minute Potion of Fire Resistance from the Creative Menu.
2) Put it in a Brewing Stand.
3) Add a Ghast Tear.WHAT I EXPECT:
Nothing happens. Ghast Tear shouldn't brew with a finished potion.WHAT I GET:
It brews a 22-second Potion of Regen II.LIKELY CAUSE & FIX:
I took a look at (MCP)ItemPotion.getSubItems(), which generates the set of Potion items for the brewing tab. Currently it loops through the possible values 0 - 32767, adding values that create potions to a List indexed by the potion effect. This means that, if more than one potion value produces the same effect, the list will end up with the largest potion value for that particular effect - hence all the "don't-care" bits are set.
I've attached a piece of code for you to try in (MCP)ItemPotion.getSubItems(). It will account for missing Healing/Harming potions and use the smallest value for each potion effect.
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
relates to
is duplicated by
clones