geforkt von Mirrors/Paper
526795bacd
* Update patches to handle vineflower decompiler * update patches again to handle inlined simple lambdas * update vf again and re-apply/rebuild patches * update patches after removal of verify-merges flag * fix compile issue * remove maven local * fix some issues * address more issues * fix collision patch * use paperweight release * more fixes * update fineflower and fix patches again * add missing comment descriptor --------- Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
21 Zeilen
1.1 KiB
Diff
21 Zeilen
1.1 KiB
Diff
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
|
|
index 83f1d79147630084b24be20602571f36fc62a1b3..5c9a0c91ae53b575d325a294c702668d30252fcf 100644
|
|
--- a/src/main/java/net/minecraft/world/effect/MobEffectInstance.java
|
|
+++ b/src/main/java/net/minecraft/world/effect/MobEffectInstance.java
|
|
@@ -298,7 +298,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;
|