From aa4dd1b840aace36baaeace96c6f3003e55d205b Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Sat, 14 Dec 2024 15:55:18 -0500 Subject: [PATCH] net/minecraft/network/protocol/handshake/ --- build-data/paper.at | 2 -- .../handshake/ClientIntentionPacket.java.patch | 16 ++++++++++++++++ .../handshake/ClientIntentionPacket.java.patch | 17 ----------------- 3 files changed, 16 insertions(+), 19 deletions(-) create mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch delete mode 100644 paper-server/patches/unapplied/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch diff --git a/build-data/paper.at b/build-data/paper.at index c646267776..91c5e8792f 100644 --- a/build-data/paper.at +++ b/build-data/paper.at @@ -39,7 +39,6 @@ public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket xRot public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket y public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket yRot public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket z -public net.minecraft.network.protocol.handshake.ClientIntentionPacket port public net.minecraft.resources.RegistryOps lookupProvider public net.minecraft.resources.RegistryOps$HolderLookupAdapter public net.minecraft.server.Main forceUpgrade(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lcom/mojang/datafixers/DataFixer;ZLjava/util/function/BooleanSupplier;Lnet/minecraft/core/RegistryAccess;Z)V @@ -676,7 +675,6 @@ public net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess l public net.minecraft.world.level.storage.PrimaryLevelData settings public net.minecraft.world.scores.Objective displayName public net.minecraft.world.scores.criteria.ObjectiveCriteria CRITERIA_CACHE -public-f net.minecraft.network.protocol.handshake.ClientIntentionPacket hostName public-f net.minecraft.server.MinecraftServer potionBrewing public-f net.minecraft.server.MinecraftServer storageSource public-f net.minecraft.server.ReloadableServerResources commands diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch new file mode 100644 index 0000000000..65ea146b9f --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java ++++ b/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java +@@ -1,3 +_,4 @@ ++// mc-dev import + package net.minecraft.network.protocol.handshake; + + import net.minecraft.network.FriendlyByteBuf; +@@ -20,7 +_,7 @@ + } + + private ClientIntentionPacket(FriendlyByteBuf buffer) { +- this(buffer.readVarInt(), buffer.readUtf(255), buffer.readUnsignedShort(), ClientIntent.byId(buffer.readVarInt())); ++ this(buffer.readVarInt(), buffer.readUtf(Short.MAX_VALUE), buffer.readUnsignedShort(), ClientIntent.byId(buffer.readVarInt())); // Spigot - increase max hostName length + } + + private void write(FriendlyByteBuf buffer) { diff --git a/paper-server/patches/unapplied/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch b/paper-server/patches/unapplied/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch deleted file mode 100644 index 071ea04212..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch +++ /dev/null @@ -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) {