mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-25 12:45:35 +01:00
Fixed max player count value mapping (#541)
This commit is contained in:
parent
8eaadd0f18
commit
b174dd31b4
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user