mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 01:01:58 +01:00
SPIGOT-749: Fix NullPointerException and broken logic in Potion.fromDamage(int)
By: Antony Riley <antony@cyberiantiger.org>
This commit is contained in:
parent
00bc2e04a5
commit
953a90bdd3
@ -405,7 +405,7 @@ public class Potion {
|
||||
if ((damage & SPLASH_BIT) > 0) {
|
||||
potion = potion.splash();
|
||||
}
|
||||
if ((!type.equals(PotionType.INSTANT_DAMAGE) || type.equals(PotionType.FIRE_RESISTANCE)) && (damage & EXTENDED_BIT) > 0) {
|
||||
if ((type == null || !type.isInstant()) && (damage & EXTENDED_BIT) > 0) {
|
||||
potion = potion.extend();
|
||||
}
|
||||
return potion;
|
||||
|
Loading…
Reference in New Issue
Block a user