Skip to content

Commit 3134d82

Browse files
committed
fix: Negative health packet values for Alpha and early Beta, resolves #47
1 parent b2c8b91 commit 3134d82

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/net/minecraft/server/NetServerHandler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,11 @@ public void sendPacket(Packet packet) {
10321032
this.g = this.f;
10331033
return;
10341034
}
1035+
} else if (packet instanceof Packet8UpdateHealth) {
1036+
Packet8UpdateHealth packet8 = (Packet8UpdateHealth) packet;
1037+
if (this.networkManager.pvn <= 7 && packet8.a < 0) {
1038+
packet8.a = 0;
1039+
}
10351040
}
10361041

10371042
// CraftBukkit start

0 commit comments

Comments
 (0)