3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00
Dieser Commit ist enthalten in:
KennyTV 2020-06-15 20:11:21 +02:00
Ursprung 8d7c7743b8
Commit 6cd6c87127
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
2 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -80,7 +80,7 @@ public class ProtocolVersion {
register(v1_15 = new ProtocolVersion(573, "1.15")); register(v1_15 = new ProtocolVersion(573, "1.15"));
register(v1_15_1 = new ProtocolVersion(575, "1.15.1")); register(v1_15_1 = new ProtocolVersion(575, "1.15.1"));
register(v1_15_2 = new ProtocolVersion(578, "1.15.2")); 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")); register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
} }

Datei anzeigen

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