aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch')
-rw-r--r--patch-remap/mache-vineflower/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch b/patch-remap/mache-vineflower/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch
new file mode 100644
index 0000000000..879d7c0cbf
--- /dev/null
+++ b/patch-remap/mache-vineflower/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch
@@ -0,0 +1,33 @@
+--- a/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java
++++ b/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.network.protocol.handshake;
+
+ import net.minecraft.network.ConnectionProtocol;
+@@ -5,16 +6,9 @@
+ import net.minecraft.network.protocol.Packet;
+
+ public record ClientIntentionPacket(int protocolVersion, String hostName, int port, ClientIntent intention) implements Packet<ServerHandshakePacketListener> {
++
+ private static final int MAX_HOST_LENGTH = 255;
+
+- @Deprecated
+- public ClientIntentionPacket(int protocolVersion, String hostName, int port, ClientIntent intention) {
+- this.protocolVersion = protocolVersion;
+- this.hostName = hostName;
+- this.port = port;
+- this.intention = intention;
+- }
+-
+ public ClientIntentionPacket(FriendlyByteBuf buffer) {
+ this(buffer.readVarInt(), buffer.readUtf(255), buffer.readUnsignedShort(), ClientIntent.byId(buffer.readVarInt()));
+ }
+@@ -27,7 +21,6 @@
+ buffer.writeVarInt(this.intention.id());
+ }
+
+- @Override
+ public void handle(ServerHandshakePacketListener handler) {
+ handler.handleIntention(this);
+ }