mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
Fix the decoding of potions for Water.
By: FearThe1337 <admin@fearthe1337.com>
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user