diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_12_2to1_13/Protocol1_12_2To1_13.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_12_2to1_13/Protocol1_12_2To1_13.java index 822f2b506..7d5c3cf42 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_12_2to1_13/Protocol1_12_2To1_13.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_12_2to1_13/Protocol1_12_2To1_13.java @@ -173,11 +173,11 @@ public class Protocol1_12_2To1_13 extends AbstractProtocol { + registerClientbound(State.LOGIN, ClientboundLoginPackets.LOGIN_DISCONNECT, wrapper -> { componentRewriter.processText(wrapper.user(), wrapper.passthrough(Types.COMPONENT)); }); - registerClientbound(State.STATUS, ClientboundStatusPackets.STATUS_RESPONSE.getId(), ClientboundStatusPackets.STATUS_RESPONSE.getId(), new PacketHandlers() { + registerClientbound(State.STATUS, ClientboundStatusPackets.STATUS_RESPONSE, new PacketHandlers() { @Override public void register() { map(Types.STRING); diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_15_2to1_16/Protocol1_15_2To1_16.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_15_2to1_16/Protocol1_15_2To1_16.java index da21e8b76..ec2841c34 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_15_2to1_16/Protocol1_15_2To1_16.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_15_2to1_16/Protocol1_15_2To1_16.java @@ -81,14 +81,14 @@ public class Protocol1_15_2To1_16 extends AbstractProtocol(this).register(ClientboundPackets1_15.AWARD_STATS); // Login Success - registerClientbound(State.LOGIN, ClientboundLoginPackets.GAME_PROFILE.getId(), ClientboundLoginPackets.GAME_PROFILE.getId(), wrapper -> { + registerClientbound(State.LOGIN, ClientboundLoginPackets.GAME_PROFILE, wrapper -> { // Transform string to a uuid UUID uuid = UUID.fromString(wrapper.read(Types.STRING)); wrapper.write(Types.UUID, uuid); }); // Motd Status - line breaks are no longer allowed for player samples - registerClientbound(State.STATUS, ClientboundStatusPackets.STATUS_RESPONSE.getId(), ClientboundStatusPackets.STATUS_RESPONSE.getId(), wrapper -> { + registerClientbound(State.STATUS, ClientboundStatusPackets.STATUS_RESPONSE, wrapper -> { String original = wrapper.passthrough(Types.STRING); JsonObject object = GsonUtil.getGson().fromJson(original, JsonObject.class); JsonObject players = object.getAsJsonObject("players"); @@ -263,4 +263,4 @@ public class Protocol1_15_2To1_16 extends AbstractProtocol getTagRewriter() { return tagRewriter; } -} \ No newline at end of file +} diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_18_2to1_19/Protocol1_18_2To1_19.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_18_2to1_19/Protocol1_18_2To1_19.java index 0ca01ebfe..a5319df28 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_18_2to1_19/Protocol1_18_2To1_19.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_18_2to1_19/Protocol1_18_2To1_19.java @@ -232,7 +232,7 @@ public final class Protocol1_18_2To1_19 extends AbstractProtocol getTagRewriter() { return tagRewriter; } -} \ No newline at end of file +} diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_19_1to1_19_3/Protocol1_19_1To1_19_3.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_19_1to1_19_3/Protocol1_19_1To1_19_3.java index 4685803b2..e71b17ca7 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_19_1to1_19_3/Protocol1_19_1To1_19_3.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_19_1to1_19_3/Protocol1_19_1To1_19_3.java @@ -279,7 +279,7 @@ public final class Protocol1_19_1To1_19_3 extends AbstractProtocol getTagRewriter() { return tagRewriter; } -} \ No newline at end of file +} diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_19to1_19_1/Protocol1_19To1_19_1.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_19to1_19_1/Protocol1_19To1_19_1.java index f02ed7672..c18493a3a 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_19to1_19_1/Protocol1_19To1_19_1.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_19to1_19_1/Protocol1_19To1_19_1.java @@ -228,7 +228,7 @@ public final class Protocol1_19To1_19_1 extends AbstractProtocol { + registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.UPDATE_TAGS, wrapper -> { tagRewriter.handleGeneric(wrapper); wrapper.resetReader(); wrapper.user().put(new LastTags(wrapper)); @@ -131,7 +131,7 @@ public final class Protocol1_20To1_20_2 extends AbstractProtocol { + registerServerbound(State.LOGIN, ServerboundLoginPackets.HELLO, wrapper -> { wrapper.passthrough(Types.STRING); // Name final UUID uuid = wrapper.read(Types.UUID); @@ -144,7 +144,7 @@ public final class Protocol1_20To1_20_2 extends AbstractProtocol { + registerClientbound(State.LOGIN, ClientboundLoginPackets.GAME_PROFILE, wrapper -> { wrapper.user().get(ConfigurationState.class).setBridgePhase(BridgePhase.PROFILE_SENT); wrapper.user().getProtocolInfo().setServerState(State.PLAY); }); diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_8to1_9/Protocol1_8To1_9.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_8to1_9/Protocol1_8To1_9.java index a28acd530..c658d7826 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_8to1_9/Protocol1_8To1_9.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_8to1_9/Protocol1_8To1_9.java @@ -83,7 +83,7 @@ public class Protocol1_8To1_9 extends AbstractProtocol { + registerClientbound(State.LOGIN, ClientboundLoginPackets.LOGIN_DISCONNECT, wrapper -> { if (wrapper.isReadable(Types.COMPONENT, 0)) { // Already written as component in the base protocol return;