diff options
Diffstat (limited to 'patches/server/0738-Load-effect-amplifiers-greater-than-127-correctly.patch')
-rw-r--r-- | patches/server/0738-Load-effect-amplifiers-greater-than-127-correctly.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/patches/server/0738-Load-effect-amplifiers-greater-than-127-correctly.patch b/patches/server/0738-Load-effect-amplifiers-greater-than-127-correctly.patch new file mode 100644 index 0000000000..b0884e52bd --- /dev/null +++ b/patches/server/0738-Load-effect-amplifiers-greater-than-127-correctly.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +Date: Tue, 21 Dec 2021 22:13:26 -0800 +Subject: [PATCH] Load effect amplifiers greater than 127 correctly + +MOJIRA: MC-118857 + +diff --git a/src/main/java/net/minecraft/world/effect/MobEffectInstance.java b/src/main/java/net/minecraft/world/effect/MobEffectInstance.java +index af7889fbed11ca413124908cb174a285d6d973e2..68e1b8271475996020af50b3b2cf04cd25aa6c85 100644 +--- a/src/main/java/net/minecraft/world/effect/MobEffectInstance.java ++++ b/src/main/java/net/minecraft/world/effect/MobEffectInstance.java +@@ -293,7 +293,7 @@ public class MobEffectInstance implements Comparable<MobEffectInstance> { + } + + private static MobEffectInstance loadSpecifiedEffect(MobEffect type, CompoundTag nbt) { +- int i = nbt.getByte("amplifier"); ++ int i = Byte.toUnsignedInt(nbt.getByte("amplifier")); // Paper - correctly load amplifiers > 127 + int j = nbt.getInt("duration"); + boolean bl = nbt.getBoolean("ambient"); + boolean bl2 = true; |