2021-12-22 19:20:33 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
|
|
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
|
2023-09-22 19:31:02 +02:00
|
|
|
index cc802adda0364ed7249ead0454fc174a3af87d3a..587ceac5471b201e8b972da52f1c0131682f85cd 100644
|
2021-12-22 19:20:33 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/effect/MobEffectInstance.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/effect/MobEffectInstance.java
|
2023-09-22 16:58:35 +02:00
|
|
|
@@ -293,7 +293,7 @@ public class MobEffectInstance implements Comparable<MobEffectInstance> {
|
2021-12-22 19:20:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
private static MobEffectInstance loadSpecifiedEffect(MobEffect type, CompoundTag nbt) {
|
2023-09-22 16:58:35 +02:00
|
|
|
- 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");
|
2021-12-22 19:20:33 +01:00
|
|
|
boolean bl2 = true;
|