net/minecraft/network/protocol/handshake/

This commit is contained in:
Owen1212055
2024-12-14 15:55:18 -05:00
parent 31913c0b0a
commit aa4dd1b840
3 changed files with 16 additions and 19 deletions

View File

@@ -1,17 +0,0 @@
--- 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.FriendlyByteBuf;
@@ -11,7 +12,8 @@
private static final int MAX_HOST_LENGTH = 255;
private ClientIntentionPacket(FriendlyByteBuf buf) {
- this(buf.readVarInt(), buf.readUtf(255), buf.readUnsignedShort(), ClientIntent.byId(buf.readVarInt()));
+ // Spigot - increase max hostName length
+ this(buf.readVarInt(), buf.readUtf(Short.MAX_VALUE), buf.readUnsignedShort(), ClientIntent.byId(buf.readVarInt()));
}
private void write(FriendlyByteBuf buf) {