net/minecraft/network/protocol/handshake/

This commit is contained in:
Owen1212055 2024-12-14 15:55:18 -05:00
parent 31913c0b0a
commit aa4dd1b840
No known key found for this signature in database
GPG key ID: 2133292072886A30
3 changed files with 16 additions and 19 deletions

View file

@ -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

View file

@ -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) {

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) {