From b174dd31b4c95a59fa829f2a1e12e9634a5499fc Mon Sep 17 00:00:00 2001 From: RK_01 <50594595+RaphiMC@users.noreply.github.com> Date: Fri, 31 Mar 2023 09:40:18 +0200 Subject: [PATCH] Fixed max player count value mapping (#541) --- .../protocol1_16_1to1_16_2/packets/EntityPackets1_16_2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_16_1to1_16_2/packets/EntityPackets1_16_2.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_16_1to1_16_2/packets/EntityPackets1_16_2.java index 6aac6677..22b634c5 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_16_1to1_16_2/packets/EntityPackets1_16_2.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_16_1to1_16_2/packets/EntityPackets1_16_2.java @@ -100,7 +100,7 @@ public class EntityPackets1_16_2 extends EntityRewriter { int maxPlayers = wrapper.read(Type.VAR_INT); - wrapper.write(Type.UNSIGNED_BYTE, (short) Math.max(maxPlayers, 255)); + wrapper.write(Type.UNSIGNED_BYTE, (short) Math.min(maxPlayers, 255)); }); // ... handler(getTrackerHandler(Entity1_16_2Types.PLAYER, Type.INT));