3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-11-20 06:50:10 +01:00

Fixed max player count value mapping (#541)

Dieser Commit ist enthalten in:
RK_01 2023-03-31 09:40:18 +02:00 committet von GitHub
Ursprung 8eaadd0f18
Commit b174dd31b4
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -100,7 +100,7 @@ public class EntityPackets1_16_2 extends EntityRewriter<ClientboundPackets1_16_2
map(Type.LONG); // Seed map(Type.LONG); // Seed
handler(wrapper -> { handler(wrapper -> {
int maxPlayers = wrapper.read(Type.VAR_INT); 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)); handler(getTrackerHandler(Entity1_16_2Types.PLAYER, Type.INT));