mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
Fix the decoding of potions for Water.
By: FearThe1337 <admin@fearthe1337.com>
This commit is contained in:
parent
3dbfc6f396
commit
d8df20aca9
1 changed files with 1 additions and 1 deletions
|
@ -395,7 +395,7 @@ public class Potion {
|
||||||
public static Potion fromDamage(int damage) {
|
public static Potion fromDamage(int damage) {
|
||||||
PotionType type = PotionType.getByDamageValue(damage & POTION_BIT);
|
PotionType type = PotionType.getByDamageValue(damage & POTION_BIT);
|
||||||
Potion potion;
|
Potion potion;
|
||||||
if (type == null || (type == PotionType.WATER && damage != 0)) {
|
if (type == null || type == PotionType.WATER) {
|
||||||
potion = new Potion(damage & NAME_BIT);
|
potion = new Potion(damage & NAME_BIT);
|
||||||
} else {
|
} else {
|
||||||
int level = (damage & TIER_BIT) >> TIER_SHIFT;
|
int level = (damage & TIER_BIT) >> TIER_SHIFT;
|
||||||
|
|
Loading…
Reference in a new issue