Fix the decoding of potions for Water.

By: FearThe1337 <admin@fearthe1337.com>
This commit is contained in:
Bukkit/Spigot 2014-12-17 17:22:02 +01:00
parent 3dbfc6f396
commit d8df20aca9

View file

@ -395,7 +395,7 @@ public class Potion {
public static Potion fromDamage(int damage) {
PotionType type = PotionType.getByDamageValue(damage & POTION_BIT);
Potion potion;
if (type == null || (type == PotionType.WATER && damage != 0)) {
if (type == null || type == PotionType.WATER) {
potion = new Potion(damage & NAME_BIT);
} else {
int level = (damage & TIER_BIT) >> TIER_SHIFT;