diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/base/BaseProtocol1_16.java b/common/src/main/java/com/viaversion/viaversion/protocols/base/BaseProtocol1_16.java index 925aee354..25f4f6c51 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/base/BaseProtocol1_16.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/base/BaseProtocol1_16.java @@ -26,6 +26,6 @@ public class BaseProtocol1_16 extends BaseProtocol1_7 { @Override protected UUID passthroughLoginUUID(final PacketWrapper wrapper) throws Exception { - return wrapper.passthrough(Type.UUID_INT_ARRAY); + return wrapper.passthrough(Type.UUID); } } diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_16to1_15_2/Protocol1_16To1_15_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_16to1_15_2/Protocol1_16To1_15_2.java index b88c62d2e..6771cc880 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_16to1_15_2/Protocol1_16To1_15_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_16to1_15_2/Protocol1_16To1_15_2.java @@ -84,9 +84,9 @@ public class Protocol1_16To1_15_2 extends AbstractProtocol { - // Transform string to int array + // Transform string to a uuid UUID uuid = UUID.fromString(wrapper.read(Type.STRING)); - wrapper.write(Type.UUID_INT_ARRAY, uuid); + wrapper.write(Type.UUID, uuid); }); } }); diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19to1_18_2/ClientboundPackets1_19.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19to1_18_2/ClientboundPackets1_19.java index b816dd999..08c92953f 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19to1_18_2/ClientboundPackets1_19.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19to1_18_2/ClientboundPackets1_19.java @@ -33,42 +33,42 @@ public enum ClientboundPackets1_19 implements ClientboundPacketType { BLOCK_CHANGE, // 0x09 BOSSBAR, // 0x0A SERVER_DIFFICULTY, // 0x0B - CLEAR_TITLES, // 0x0D - TAB_COMPLETE, // 0x0E - DECLARE_COMMANDS, // 0x0F - CLOSE_WINDOW, // 0x10 - WINDOW_ITEMS, // 0x11 - WINDOW_PROPERTY, // 0x12 - SET_SLOT, // 0x13 - COOLDOWN, // 0x14 - PLUGIN_MESSAGE, // 0x15 - NAMED_SOUND, // 0x16 - DISCONNECT, // 0x17 - ENTITY_STATUS, // 0x18 - EXPLOSION, // 0x19 - UNLOAD_CHUNK, // 0x1A - GAME_EVENT, // 0x1B - OPEN_HORSE_WINDOW, // 0x1C - WORLD_BORDER_INIT, // 0x1D - KEEP_ALIVE, // 0x1E - CHUNK_DATA, // 0x1F - EFFECT, // 0x20 - SPAWN_PARTICLE, // 0x21 - UPDATE_LIGHT, // 0x22 - JOIN_GAME, // 0x23 - MAP_DATA, // 0x24 - TRADE_LIST, // 0x25 - ENTITY_POSITION, // 0x26 - ENTITY_POSITION_AND_ROTATION, // 0x27 - ENTITY_ROTATION, // 0x28 - VEHICLE_MOVE, // 0x29 - OPEN_BOOK, // 0x2A - OPEN_WINDOW, // 0x2B - OPEN_SIGN_EDITOR, // 0x2C - PING, // 0x2D - CRAFT_RECIPE_RESPONSE, // 0x2E - PLAYER_ABILITIES, // 0x2F - PLAYER_CHAT, + CLEAR_TITLES, // 0x0C + TAB_COMPLETE, // 0x0D + DECLARE_COMMANDS, // 0x0E + CLOSE_WINDOW, // 0x0F + WINDOW_ITEMS, // 0x10 + WINDOW_PROPERTY, // 0x11 + SET_SLOT, // 0x12 + COOLDOWN, // 0x13 + PLUGIN_MESSAGE, // 0x14 + NAMED_SOUND, // 0x15 + DISCONNECT, // 0x16 + ENTITY_STATUS, // 0x17 + EXPLOSION, // 0x18 + UNLOAD_CHUNK, // 0x19 + GAME_EVENT, // 0x1A + OPEN_HORSE_WINDOW, // 0x1B + WORLD_BORDER_INIT, // 0x1C + KEEP_ALIVE, // 0x1D + CHUNK_DATA, // 0x1E + EFFECT, // 0x1F + SPAWN_PARTICLE, // 0x20 + UPDATE_LIGHT, // 0x21 + JOIN_GAME, // 0x22 + MAP_DATA, // 0x23 + TRADE_LIST, // 0x24 + ENTITY_POSITION, // 0x25 + ENTITY_POSITION_AND_ROTATION, // 0x26 + ENTITY_ROTATION, // 0x27 + VEHICLE_MOVE, // 0x28 + OPEN_BOOK, // 0x29 + OPEN_WINDOW, // 0x2A + OPEN_SIGN_EDITOR, // 0x2B + PING, // 0x2C + CRAFT_RECIPE_RESPONSE, // 0x2D + PLAYER_ABILITIES, // 0x2E + PLAYER_CHAT, // 0x2F COMBAT_END, // 0x30 COMBAT_ENTER, // 0x31 COMBAT_KILL, // 0x32 @@ -113,16 +113,16 @@ public enum ClientboundPackets1_19 implements ClientboundPacketType { ENTITY_SOUND, // 0x59 SOUND, // 0x5A STOP_SOUND, // 0x5B - SYSTEM_CHAT, - TAB_LIST, // 0x5C - NBT_QUERY, // 0x5D - COLLECT_ITEM, // 0x5E - ENTITY_TELEPORT, // 0x5F - ADVANCEMENTS, // 0x60 - ENTITY_PROPERTIES, // 0x61 - ENTITY_EFFECT, // 0x62 - DECLARE_RECIPES, // 0x63 - TAGS; // 0x64 + SYSTEM_CHAT, // 0x5C + TAB_LIST, // 0x5D + NBT_QUERY, // 0x5E + COLLECT_ITEM, // 0x5F + ENTITY_TELEPORT, // 0x60 + ADVANCEMENTS, // 0x61 + ENTITY_PROPERTIES, // 0x62 + ENTITY_EFFECT, // 0x63 + DECLARE_RECIPES, // 0x64 + TAGS; // 0x65 @Override public int getId() { diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19to1_18_2/Protocol1_19To1_18_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19to1_18_2/Protocol1_19To1_18_2.java index f7e5aae68..26f941780 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19to1_18_2/Protocol1_19To1_18_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_19to1_18_2/Protocol1_19To1_18_2.java @@ -17,7 +17,6 @@ */ package com.viaversion.viaversion.protocols.protocol1_19to1_18_2; -import com.google.gson.JsonObject; import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.data.MappingData; @@ -55,20 +54,16 @@ import java.security.spec.X509EncodedKeySpec; public final class Protocol1_19To1_18_2 extends AbstractProtocol { public static final MappingData MAPPINGS = new MappingDataBase("1.18", "1.19", true); - private static final JsonObject EMPTY_COMPONENT = new JsonObject(); private static final KeyFactory RSA_FACTORY; - static { try { RSA_FACTORY = KeyFactory.getInstance("RSA"); } catch (final NoSuchAlgorithmException e) { throw new RuntimeException(e); } - EMPTY_COMPONENT.addProperty("text", ""); } - private static final byte[] EMPTY_BYTES = new byte[0]; private final EntityPackets entityRewriter = new EntityPackets(this); private final InventoryPackets itemRewriter = new InventoryPackets(this); @@ -191,7 +186,7 @@ public final class Protocol1_19To1_18_2 extends AbstractProtocol { // No properties