Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +01:00
Use normal uuid type in gameprofile packet
Dieser Commit ist enthalten in:
Ursprung
0e66228a96
Commit
5b9f775743
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -84,9 +84,9 @@ public class Protocol1_16To1_15_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(wrapper -> {
|
||||
// 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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -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() {
|
||||
|
@ -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<ClientboundPackets1_18, ClientboundPackets1_19, ServerboundPackets1_17, ServerboundPackets1_17> {
|
||||
|
||||
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<ClientboundPack
|
||||
registerClientbound(State.LOGIN, ClientboundLoginPackets.GAME_PROFILE.getId(), ClientboundLoginPackets.GAME_PROFILE.getId(), new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.UUID_INT_ARRAY, Type.UUID); // UUID
|
||||
map(Type.UUID); // UUID
|
||||
map(Type.STRING); // Name
|
||||
handler(wrapper -> {
|
||||
// No properties
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren