1.16 pre6

This commit is contained in:
KennyTV 2020-06-15 20:11:21 +02:00
parent 8d7c7743b8
commit 6cd6c87127
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 6 additions and 3 deletions

View File

@ -80,7 +80,7 @@ public class ProtocolVersion {
register(v1_15 = new ProtocolVersion(573, "1.15"));
register(v1_15_1 = new ProtocolVersion(575, "1.15.1"));
register(v1_15_2 = new ProtocolVersion(578, "1.15.2"));
register(v1_16 = new ProtocolVersion(729, "1.16"));
register(v1_16 = new ProtocolVersion(730, "1.16"));
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
}

View File

@ -165,9 +165,11 @@ public class EntityPackets {
@Override
public void registerMap() {
handler(DIMENSION_HANDLER);
map(Type.LONG);
map(Type.UNSIGNED_BYTE);
map(Type.LONG); // Seed
map(Type.UNSIGNED_BYTE); // Gamemode
handler(wrapper -> {
wrapper.write(Type.BYTE, (byte) -1); // Previous gamemode, set to none
ClientWorld clientWorld = wrapper.user().get(ClientWorld.class);
String dimensionId = wrapper.get(Type.STRING, 0);
clientWorld.setEnvironment(dimensionId);
@ -186,6 +188,7 @@ public class EntityPackets {
map(Type.INT); // Entity ID
map(Type.UNSIGNED_BYTE); // Gamemode
handler(wrapper -> {
wrapper.write(Type.BYTE, (byte) -1); // Previous gamemode, set to none
wrapper.write(Type.STRING_ARRAY, WORLD_NAMES); // World list - only used for command completion
wrapper.write(Type.NBT, DIMENSIONS_TAG); // Dimension registry
});