Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-4047: Ignore non-existent potions
Dieser Commit ist enthalten in:
Ursprung
fc1b107579
Commit
80fefcf5ef
@ -71,6 +71,11 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
|
|||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
NBTTagCompound effect = list.getCompound(i);
|
NBTTagCompound effect = list.getCompound(i);
|
||||||
PotionEffectType type = PotionEffectType.getById(effect.getByte(ID.NBT));
|
PotionEffectType type = PotionEffectType.getById(effect.getByte(ID.NBT));
|
||||||
|
// SPIGOT-4047: Vanilla just disregards these
|
||||||
|
if (type == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
int amp = effect.getByte(AMPLIFIER.NBT);
|
int amp = effect.getByte(AMPLIFIER.NBT);
|
||||||
int duration = effect.getInt(DURATION.NBT);
|
int duration = effect.getInt(DURATION.NBT);
|
||||||
boolean ambient = effect.getBoolean(AMBIENT.NBT);
|
boolean ambient = effect.getBoolean(AMBIENT.NBT);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren