diff --git a/patches/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch b/patches/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch index c8353893e5..a6cdcf0599 100644 --- a/patches/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch +++ b/patches/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java +++ b/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java -@@ -49,6 +49,7 @@ +@@ -49,6 +_,7 @@ import net.minecraft.resources.ResourceKey; import net.minecraft.tags.TagKey; import net.minecraft.tags.TagNetworkSerialization; @@ -8,7 +8,7 @@ import net.neoforged.api.distmarker.Dist; import net.neoforged.api.distmarker.OnlyIn; import org.slf4j.Logger; -@@ -97,12 +98,12 @@ +@@ -97,12 +_,12 @@ this.serverBrand = brandpayload.brand(); this.telemetryManager.onServerBrandReceived(brandpayload.brand()); } else { @@ -23,7 +23,7 @@ protected abstract RegistryAccess.Frozen registryAccess(); -@@ -231,6 +232,10 @@ +@@ -231,6 +_,10 @@ } public void send(Packet p_295097_) { @@ -34,7 +34,7 @@ this.connection.send(p_295097_); } -@@ -263,5 +268,15 @@ +@@ -263,5 +_,15 @@ @OnlyIn(Dist.CLIENT) static record DeferredPacket(Packet packet, BooleanSupplier sendCondition, long expirationTime) { diff --git a/patches/net/minecraft/client/multiplayer/ClientConfigurationPacketListenerImpl.java.patch b/patches/net/minecraft/client/multiplayer/ClientConfigurationPacketListenerImpl.java.patch index 9b8441e93b..b663079804 100644 --- a/patches/net/minecraft/client/multiplayer/ClientConfigurationPacketListenerImpl.java.patch +++ b/patches/net/minecraft/client/multiplayer/ClientConfigurationPacketListenerImpl.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/client/multiplayer/ClientConfigurationPacketListenerImpl.java +++ b/net/minecraft/client/multiplayer/ClientConfigurationPacketListenerImpl.java -@@ -3,28 +3,39 @@ +@@ -3,28 +_,39 @@ import com.mojang.authlib.GameProfile; import com.mojang.logging.LogUtils; import net.minecraft.client.Minecraft; @@ -40,7 +40,7 @@ public ClientConfigurationPacketListenerImpl(Minecraft p_295262_, Connection p_296339_, CommonListenerCookie p_294706_) { super(p_295262_, p_296339_, p_294706_); -@@ -44,11 +55,38 @@ +@@ -44,11 +_,38 @@ } @Override @@ -82,7 +82,7 @@ LOGGER.warn("Unknown custom packet payload: {}", p_296412_.id()); } -@@ -84,6 +122,7 @@ +@@ -84,6 +_,7 @@ this.telemetryManager, this.receivedRegistries, this.enabledFeatures, @@ -90,7 +90,7 @@ this.serverBrand, this.serverData, this.postDisconnectScreen -@@ -97,5 +136,14 @@ +@@ -97,5 +_,14 @@ @Override public void tick() { this.sendDeferredPackets(); diff --git a/patches/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java.patch b/patches/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java.patch index cd39d50e77..5f3e879697 100644 --- a/patches/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java.patch +++ b/patches/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java +++ b/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java -@@ -165,6 +165,7 @@ +@@ -165,6 +_,7 @@ this.minecraft.getTelemetryManager().createWorldSessionManager(this.newWorld, this.worldLoadDuration, this.minigameName), ClientRegistryLayer.createRegistryAccess().compositeAccess(), FeatureFlags.DEFAULT_FLAGS, @@ -8,7 +8,7 @@ null, this.serverData, this.parent -@@ -180,7 +181,7 @@ +@@ -180,7 +_,7 @@ if (this.serverData != null && this.serverData.isRealm()) { this.minecraft.setScreen(new DisconnectedRealmsScreen(this.parent, CommonComponents.CONNECT_FAILED, p_104543_)); } else { @@ -17,7 +17,7 @@ } } -@@ -203,6 +204,7 @@ +@@ -203,6 +_,7 @@ @Override public void handleCustomQuery(ClientboundCustomQueryPacket p_104545_) { diff --git a/patches/net/minecraft/client/multiplayer/ClientPacketListener.java.patch b/patches/net/minecraft/client/multiplayer/ClientPacketListener.java.patch index 24db653e22..cf4b5b6ff8 100644 --- a/patches/net/minecraft/client/multiplayer/ClientPacketListener.java.patch +++ b/patches/net/minecraft/client/multiplayer/ClientPacketListener.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/client/multiplayer/ClientPacketListener.java +++ b/net/minecraft/client/multiplayer/ClientPacketListener.java -@@ -334,6 +334,7 @@ +@@ -334,6 +_,7 @@ private MessageSignatureCache messageSignatureCache = MessageSignatureCache.createDefault(); private final ChunkBatchSizeCalculator chunkBatchSizeCalculator = new ChunkBatchSizeCalculator(); private final PingDebugMonitor pingDebugMonitor; @@ -8,7 +8,7 @@ private boolean seenInsecureChatWarning = false; private volatile boolean closed; -@@ -345,6 +346,7 @@ +@@ -345,6 +_,7 @@ this.advancements = new ClientAdvancements(p_253924_, this.telemetryManager); this.suggestionsProvider = new ClientSuggestionProvider(this, p_253924_); this.pingDebugMonitor = new PingDebugMonitor(this, p_253924_.getDebugOverlay().getPingLogger()); @@ -16,7 +16,7 @@ } public ClientSuggestionProvider getSuggestionsProvider() { -@@ -403,6 +405,7 @@ +@@ -403,6 +_,7 @@ this.minecraft.debugRenderer.clear(); this.minecraft.player.resetPos(); @@ -24,7 +24,7 @@ this.minecraft.player.setId(p_105030_.playerId()); this.level.addEntity(this.minecraft.player); this.minecraft.player.input = new KeyboardInput(this.minecraft.options); -@@ -764,6 +767,7 @@ +@@ -764,6 +_,7 @@ this.telemetryManager, this.registryAccess, this.enabledFeatures, @@ -32,7 +32,7 @@ this.serverBrand, this.serverData, this.postDisconnectScreen -@@ -1110,7 +1114,9 @@ +@@ -1110,7 +_,9 @@ localplayer1.getAttributes().assignValues(localplayer.getAttributes()); } @@ -42,7 +42,7 @@ this.level.addEntity(localplayer1); localplayer1.setYRot(-180.0F); localplayer1.input = new KeyboardInput(this.minecraft.options); -@@ -1230,10 +1236,7 @@ +@@ -1230,10 +_,7 @@ PacketUtils.ensureRunningOnSameThread(p_104976_, this, this.minecraft); BlockPos blockpos = p_104976_.getPos(); this.minecraft.level.getBlockEntity(blockpos, p_104976_.getType()).ifPresent(p_205557_ -> { @@ -54,7 +54,7 @@ if (p_205557_ instanceof CommandBlockEntity && this.minecraft.screen instanceof CommandBlockEditScreen) { ((CommandBlockEditScreen)this.minecraft.screen).updateGui(); -@@ -1395,7 +1398,9 @@ +@@ -1395,7 +_,9 @@ @Override public void handleCommands(ClientboundCommandsPacket p_104990_) { PacketUtils.ensureRunningOnSameThread(p_104990_, this, this.minecraft); @@ -65,7 +65,7 @@ } @Override -@@ -1417,6 +1422,7 @@ +@@ -1417,6 +_,7 @@ ClientRecipeBook clientrecipebook = this.minecraft.player.getRecipeBook(); clientrecipebook.setupCollections(this.recipeManager.getRecipes(), this.minecraft.level.registryAccess()); this.minecraft.populateSearchTree(SearchRegistry.RECIPE_COLLECTIONS, clientrecipebook.getCollections()); @@ -73,7 +73,7 @@ } @Override -@@ -1523,7 +1529,8 @@ +@@ -1523,7 +_,8 @@ Blocks.rebuildCache(); } @@ -83,7 +83,7 @@ } @Override -@@ -1855,7 +1862,7 @@ +@@ -1855,7 +_,7 @@ } @Override @@ -92,7 +92,7 @@ if (p_295851_ instanceof PathfindingDebugPayload pathfindingdebugpayload) { this.minecraft .debugRenderer -@@ -1922,10 +1929,16 @@ +@@ -1922,10 +_,16 @@ .gameEventListenerRenderer .trackListener(gameeventlistenerdebugpayload.listenerPos(), gameeventlistenerdebugpayload.listenerRange()); } else { @@ -110,7 +110,7 @@ private void handleUnknownCustomPayload(CustomPacketPayload p_294389_) { LOGGER.warn("Unknown custom packet payload: {}", p_294389_.id()); } -@@ -2302,6 +2315,8 @@ +@@ -2302,6 +_,8 @@ } public void sendChat(String p_249888_) { @@ -119,7 +119,7 @@ Instant instant = Instant.now(); long i = Crypt.SaltSupplier.getLong(); LastSeenMessagesTracker.Update lastseenmessagestracker$update = this.lastSeenMessages.generateAndApplyUpdate(); -@@ -2311,6 +2326,7 @@ +@@ -2311,6 +_,7 @@ } public void sendCommand(String p_250092_) { diff --git a/patches/net/minecraft/client/multiplayer/CommonListenerCookie.java.patch b/patches/net/minecraft/client/multiplayer/CommonListenerCookie.java.patch index 4544bef0f2..6c269e980f 100644 --- a/patches/net/minecraft/client/multiplayer/CommonListenerCookie.java.patch +++ b/patches/net/minecraft/client/multiplayer/CommonListenerCookie.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/client/multiplayer/CommonListenerCookie.java +++ b/net/minecraft/client/multiplayer/CommonListenerCookie.java -@@ -15,6 +15,7 @@ +@@ -15,6 +_,7 @@ WorldSessionTelemetryManager telemetryManager, RegistryAccess.Frozen receivedRegistries, FeatureFlagSet enabledFeatures, diff --git a/patches/net/minecraft/network/Connection.java.patch b/patches/net/minecraft/network/Connection.java.patch index 22f623ea10..1132a05a5c 100644 --- a/patches/net/minecraft/network/Connection.java.patch +++ b/patches/net/minecraft/network/Connection.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/Connection.java +++ b/net/minecraft/network/Connection.java -@@ -110,6 +110,7 @@ +@@ -110,6 +_,7 @@ if (this.delayedDisconnect != null) { this.disconnect(this.delayedDisconnect); } @@ -8,7 +8,7 @@ } public static void setInitialProtocolAttributes(Channel p_294962_) { -@@ -120,6 +121,7 @@ +@@ -120,6 +_,7 @@ @Override public void channelInactive(ChannelHandlerContext p_129527_) { this.disconnect(Component.translatable("disconnect.endOfStream")); @@ -16,7 +16,7 @@ } @Override -@@ -371,7 +373,7 @@ +@@ -371,7 +_,7 @@ if (this.address == null) { return "local"; } else { @@ -25,7 +25,7 @@ } } -@@ -410,6 +412,7 @@ +@@ -410,6 +_,7 @@ } public static ChannelFuture connect(InetSocketAddress p_290034_, boolean p_290035_, final Connection p_290031_) { @@ -33,7 +33,7 @@ Class oclass; EventLoopGroup eventloopgroup; if (Epoll.isAvailable() && p_290035_) { -@@ -466,6 +469,7 @@ +@@ -466,6 +_,7 @@ public static Connection connectToLocalServer(SocketAddress p_129494_) { final Connection connection = new Connection(PacketFlow.CLIENTBOUND); @@ -41,7 +41,7 @@ new Bootstrap().group(LOCAL_WORKER_GROUP.get()).handler(new ChannelInitializer() { @Override protected void initChannel(Channel p_129557_) { -@@ -558,6 +562,14 @@ +@@ -558,6 +_,14 @@ public float getAverageSentPackets() { return this.averageSentPackets; diff --git a/patches/net/minecraft/network/ConnectionProtocol.java.patch b/patches/net/minecraft/network/ConnectionProtocol.java.patch index c043b83e17..7cd04a64c2 100644 --- a/patches/net/minecraft/network/ConnectionProtocol.java.patch +++ b/patches/net/minecraft/network/ConnectionProtocol.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/ConnectionProtocol.java +++ b/net/minecraft/network/ConnectionProtocol.java -@@ -3,6 +3,7 @@ +@@ -3,6 +_,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.mojang.logging.LogUtils; @@ -8,7 +8,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2IntMap; -@@ -12,6 +13,7 @@ +@@ -12,6 +_,7 @@ import java.util.List; import java.util.Map; import java.util.Set; @@ -16,7 +16,7 @@ import java.util.function.Function; import javax.annotation.Nullable; import net.minecraft.Util; -@@ -238,7 +240,7 @@ +@@ -238,7 +_,7 @@ .addPacket(ClientboundContainerSetSlotPacket.class, ClientboundContainerSetSlotPacket::new) .addPacket(ClientboundCooldownPacket.class, ClientboundCooldownPacket::new) .addPacket(ClientboundCustomChatCompletionsPacket.class, ClientboundCustomChatCompletionsPacket::new) @@ -25,7 +25,7 @@ .addPacket(ClientboundDamageEventPacket.class, ClientboundDamageEventPacket::new) .addPacket(ClientboundDeleteChatPacket.class, ClientboundDeleteChatPacket::new) .addPacket(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new) -@@ -346,7 +348,7 @@ +@@ -346,7 +_,7 @@ .addPacket(ServerboundContainerButtonClickPacket.class, ServerboundContainerButtonClickPacket::new) .addPacket(ServerboundContainerClickPacket.class, ServerboundContainerClickPacket::new) .addPacket(ServerboundContainerClosePacket.class, ServerboundContainerClosePacket::new) @@ -34,7 +34,7 @@ .addPacket(ServerboundEditBookPacket.class, ServerboundEditBookPacket::new) .addPacket(ServerboundEntityTagQuery.class, ServerboundEntityTagQuery::new) .addPacket(ServerboundInteractPacket.class, ServerboundInteractPacket::new) -@@ -430,7 +432,7 @@ +@@ -430,7 +_,7 @@ .addFlow( PacketFlow.CLIENTBOUND, new ConnectionProtocol.PacketSet() @@ -43,7 +43,7 @@ .addPacket(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new) .addPacket(ClientboundFinishConfigurationPacket.class, ClientboundFinishConfigurationPacket::new) .addPacket(ClientboundKeepAlivePacket.class, ClientboundKeepAlivePacket::new) -@@ -444,7 +446,7 @@ +@@ -444,7 +_,7 @@ PacketFlow.SERVERBOUND, new ConnectionProtocol.PacketSet() .addPacket(ServerboundClientInformationPacket.class, ServerboundClientInformationPacket::new) @@ -52,7 +52,7 @@ .addPacket(ServerboundFinishConfigurationPacket.class, ServerboundFinishConfigurationPacket::new) .addPacket(ServerboundKeepAlivePacket.class, ServerboundKeepAlivePacket::new) .addPacket(ServerboundPongPacket.class, ServerboundPongPacket::new) -@@ -456,6 +458,22 @@ +@@ -456,6 +_,22 @@ private final String id; private final Map> flows; @@ -75,7 +75,7 @@ private static ConnectionProtocol.ProtocolBuilder protocol() { return new ConnectionProtocol.ProtocolBuilder(); } -@@ -514,8 +532,8 @@ +@@ -514,8 +_,8 @@ } @Nullable @@ -86,7 +86,7 @@ } public boolean isValidPacketType(Packet p_294142_) { -@@ -528,19 +546,28 @@ +@@ -528,19 +_,28 @@ final Object2IntMap>> classToId = Util.make( new Object2IntOpenHashMap<>(), p_129613_ -> p_129613_.defaultReturnValue(-1) ); @@ -120,7 +120,7 @@ return this; } } -@@ -566,9 +593,9 @@ +@@ -566,9 +_,9 @@ } @Nullable diff --git a/patches/net/minecraft/network/PacketDecoder.java.patch b/patches/net/minecraft/network/PacketDecoder.java.patch index f7f3560f55..ecdb660275 100644 --- a/patches/net/minecraft/network/PacketDecoder.java.patch +++ b/patches/net/minecraft/network/PacketDecoder.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/PacketDecoder.java +++ b/net/minecraft/network/PacketDecoder.java -@@ -28,7 +28,7 @@ +@@ -28,7 +_,7 @@ ConnectionProtocol.CodecData codecdata = attribute.get(); FriendlyByteBuf friendlybytebuf = new FriendlyByteBuf(p_130536_); int j = friendlybytebuf.readVarInt(); diff --git a/patches/net/minecraft/network/protocol/PacketFlow.java.patch b/patches/net/minecraft/network/protocol/PacketFlow.java.patch index b6e9dd90f2..83ffef5429 100644 --- a/patches/net/minecraft/network/protocol/PacketFlow.java.patch +++ b/patches/net/minecraft/network/protocol/PacketFlow.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/protocol/PacketFlow.java +++ b/net/minecraft/network/protocol/PacketFlow.java -@@ -1,6 +1,6 @@ +@@ -1,6 +_,6 @@ package net.minecraft.network.protocol; -public enum PacketFlow { diff --git a/patches/net/minecraft/network/protocol/common/ClientCommonPacketListener.java.patch b/patches/net/minecraft/network/protocol/common/ClientCommonPacketListener.java.patch index 5de794cfb6..68d9e02ff5 100644 --- a/patches/net/minecraft/network/protocol/common/ClientCommonPacketListener.java.patch +++ b/patches/net/minecraft/network/protocol/common/ClientCommonPacketListener.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/protocol/common/ClientCommonPacketListener.java +++ b/net/minecraft/network/protocol/common/ClientCommonPacketListener.java -@@ -2,7 +2,7 @@ +@@ -2,7 +_,7 @@ import net.minecraft.network.ClientboundPacketListener; diff --git a/patches/net/minecraft/network/protocol/common/ClientboundCustomPayloadPacket.java.patch b/patches/net/minecraft/network/protocol/common/ClientboundCustomPayloadPacket.java.patch index 81530d34d1..c2c658e191 100644 --- a/patches/net/minecraft/network/protocol/common/ClientboundCustomPayloadPacket.java.patch +++ b/patches/net/minecraft/network/protocol/common/ClientboundCustomPayloadPacket.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/protocol/common/ClientboundCustomPayloadPacket.java +++ b/net/minecraft/network/protocol/common/ClientboundCustomPayloadPacket.java -@@ -2,6 +2,9 @@ +@@ -2,6 +_,9 @@ import com.google.common.collect.ImmutableMap; import java.util.Map; @@ -10,7 +10,7 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.common.custom.BeeDebugPayload; -@@ -51,15 +54,15 @@ +@@ -51,15 +_,15 @@ .put(WorldGenAttemptDebugPayload.ID, WorldGenAttemptDebugPayload::new) .build(); diff --git a/patches/net/minecraft/network/protocol/common/ServerCommonPacketListener.java.patch b/patches/net/minecraft/network/protocol/common/ServerCommonPacketListener.java.patch index 00d2c8e633..d1d633dc98 100644 --- a/patches/net/minecraft/network/protocol/common/ServerCommonPacketListener.java.patch +++ b/patches/net/minecraft/network/protocol/common/ServerCommonPacketListener.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/protocol/common/ServerCommonPacketListener.java +++ b/net/minecraft/network/protocol/common/ServerCommonPacketListener.java -@@ -2,7 +2,7 @@ +@@ -2,7 +_,7 @@ import net.minecraft.network.protocol.game.ServerPacketListener; diff --git a/patches/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch b/patches/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch index a35940a821..1c08922b9f 100644 --- a/patches/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch +++ b/patches/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java +++ b/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java -@@ -2,6 +2,9 @@ +@@ -2,6 +_,9 @@ import com.google.common.collect.ImmutableMap; import java.util.Map; @@ -10,7 +10,7 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.common.custom.BrandPayload; -@@ -12,20 +15,20 @@ +@@ -12,20 +_,20 @@ public record ServerboundCustomPayloadPacket(CustomPacketPayload payload) implements Packet { private static final int MAX_PAYLOAD_SIZE = 32767; private static final Map> KNOWN_TYPES = ImmutableMap.>builder( @@ -40,7 +40,7 @@ private static DiscardedPayload readUnknownPayload(ResourceLocation p_294973_, FriendlyByteBuf p_296037_) { int i = p_296037_.readableBytes(); if (i >= 0 && i <= 32767) { -@@ -35,14 +38,15 @@ +@@ -35,14 +_,15 @@ throw new IllegalArgumentException("Payload may not be larger than 32767 bytes"); } } diff --git a/patches/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java.patch b/patches/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java.patch index f7ba82063a..e24f352ca0 100644 --- a/patches/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java.patch +++ b/patches/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java +++ b/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java -@@ -3,7 +3,7 @@ +@@ -3,7 +_,7 @@ import net.minecraft.network.ConnectionProtocol; import net.minecraft.network.protocol.common.ServerCommonPacketListener; diff --git a/patches/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java.patch b/patches/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java.patch new file mode 100644 index 0000000000..5024ce2f24 --- /dev/null +++ b/patches/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java.patch @@ -0,0 +1,39 @@ +--- a/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java ++++ b/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java +@@ -3,6 +_,7 @@ + import java.util.UUID; + import net.minecraft.core.BlockPos; + import net.minecraft.core.registries.BuiltInRegistries; ++import net.minecraft.nbt.CompoundTag; + import net.minecraft.network.FriendlyByteBuf; + import net.minecraft.network.protocol.Packet; + import net.minecraft.util.Mth; +@@ -64,17 +_,17 @@ + } + + public ClientboundAddEntityPacket( +- int p_237546_, +- UUID p_237547_, +- double p_237548_, +- double p_237549_, +- double p_237550_, +- float p_237551_, +- float p_237552_, +- EntityType p_237553_, +- int p_237554_, +- Vec3 p_237555_, +- double p_237556_ ++ int p_237546_, ++ UUID p_237547_, ++ double p_237548_, ++ double p_237549_, ++ double p_237550_, ++ float p_237551_, ++ float p_237552_, ++ EntityType p_237553_, ++ int p_237554_, ++ Vec3 p_237555_, ++ double p_237556_ + ) { + this.id = p_237546_; + this.uuid = p_237547_; diff --git a/patches/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch b/patches/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch index 46a614f71c..76dc7dcf22 100644 --- a/patches/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch +++ b/patches/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java +++ b/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java -@@ -7,16 +7,8 @@ +@@ -7,16 +_,8 @@ public record ClientIntentionPacket(int protocolVersion, String hostName, int port, ClientIntent intention) implements Packet { private static final int MAX_HOST_LENGTH = 255; diff --git a/patches/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java.patch b/patches/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java.patch index ab984952b5..da110a20a7 100644 --- a/patches/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java.patch +++ b/patches/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java +++ b/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java -@@ -2,6 +2,7 @@ +@@ -2,6 +_,7 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.protocol.Packet; @@ -8,7 +8,7 @@ import net.minecraft.network.protocol.login.custom.CustomQueryPayload; import net.minecraft.network.protocol.login.custom.DiscardedQueryPayload; import net.minecraft.resources.ResourceLocation; -@@ -12,11 +13,11 @@ +@@ -12,11 +_,11 @@ public ClientboundCustomQueryPacket(FriendlyByteBuf p_179810_) { this(p_179810_.readVarInt(), readPayload(p_179810_.readResourceLocation(), p_179810_)); } diff --git a/patches/net/minecraft/network/protocol/login/ServerboundCustomQueryAnswerPacket.java.patch b/patches/net/minecraft/network/protocol/login/ServerboundCustomQueryAnswerPacket.java.patch index b87b809bee..ec6be0d1da 100644 --- a/patches/net/minecraft/network/protocol/login/ServerboundCustomQueryAnswerPacket.java.patch +++ b/patches/net/minecraft/network/protocol/login/ServerboundCustomQueryAnswerPacket.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/network/protocol/login/ServerboundCustomQueryAnswerPacket.java +++ b/net/minecraft/network/protocol/login/ServerboundCustomQueryAnswerPacket.java -@@ -8,16 +8,16 @@ +@@ -8,16 +_,16 @@ public record ServerboundCustomQueryAnswerPacket(int transactionId, @Nullable CustomQueryAnswerPayload payload) implements Packet { private static final int MAX_PAYLOAD_SIZE = 1048576; @@ -20,7 +20,7 @@ private static CustomQueryAnswerPayload readUnknownPayload(FriendlyByteBuf p_294928_) { int i = p_294928_.readableBytes(); if (i >= 0 && i <= 1048576) { -@@ -27,13 +27,13 @@ +@@ -27,13 +_,13 @@ throw new IllegalArgumentException("Payload may not be larger than 1048576 bytes"); } } diff --git a/patches/net/minecraft/server/level/ServerChunkCache.java.patch b/patches/net/minecraft/server/level/ServerChunkCache.java.patch index e48096bd4c..ba699a5ac2 100644 --- a/patches/net/minecraft/server/level/ServerChunkCache.java.patch +++ b/patches/net/minecraft/server/level/ServerChunkCache.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java -@@ -47,7 +47,7 @@ +@@ -47,7 +_,7 @@ import net.minecraft.world.level.storage.LevelData; import net.minecraft.world.level.storage.LevelStorageSource; @@ -9,7 +9,7 @@ private static final List CHUNK_STATUSES = ChunkStatus.getStatusList(); private final DistanceManager distanceManager; public final ServerLevel level; -@@ -152,6 +152,10 @@ +@@ -152,6 +_,10 @@ } } @@ -20,7 +20,7 @@ profilerfiller.incrementCounter("getChunkCacheMiss"); CompletableFuture> completablefuture = this.getChunkFutureMainThread( p_8360_, p_8361_, p_8362_, p_8363_ -@@ -189,6 +193,7 @@ +@@ -189,6 +_,7 @@ if (chunkholder == null) { return null; } else { @@ -28,7 +28,7 @@ Either either = chunkholder.getFutureIfPresent(ChunkStatus.FULL).getNow(null); if (either == null) { return null; -@@ -385,7 +390,7 @@ +@@ -385,7 +_,7 @@ for(ServerChunkCache.ChunkAndHolder serverchunkcache$chunkandholder : list) { LevelChunk levelchunk1 = serverchunkcache$chunkandholder.chunk; ChunkPos chunkpos = levelchunk1.getPos(); @@ -37,7 +37,7 @@ levelchunk1.incrementInhabitedTime(j); if (flag2 && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkpos)) { NaturalSpawner.spawnForChunk(this.level, levelchunk1, naturalspawner$spawnstate, this.spawnFriendlies, this.spawnEnemies, flag1); -@@ -464,11 +469,17 @@ +@@ -464,11 +_,17 @@ } public void addRegionTicket(TicketType p_8388_, ChunkPos p_8389_, int p_8390_, T p_8391_) { diff --git a/patches/net/minecraft/server/network/CommonListenerCookie.java.patch b/patches/net/minecraft/server/network/CommonListenerCookie.java.patch index b17726ed2b..190317ef6f 100644 --- a/patches/net/minecraft/server/network/CommonListenerCookie.java.patch +++ b/patches/net/minecraft/server/network/CommonListenerCookie.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/network/CommonListenerCookie.java +++ b/net/minecraft/server/network/CommonListenerCookie.java -@@ -3,8 +3,8 @@ +@@ -3,8 +_,8 @@ import com.mojang.authlib.GameProfile; import net.minecraft.server.level.ClientInformation; diff --git a/patches/net/minecraft/server/network/ConfigurationTask.java.patch b/patches/net/minecraft/server/network/ConfigurationTask.java.patch index c1370f21d9..05a9a40a5d 100644 --- a/patches/net/minecraft/server/network/ConfigurationTask.java.patch +++ b/patches/net/minecraft/server/network/ConfigurationTask.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/network/ConfigurationTask.java +++ b/net/minecraft/server/network/ConfigurationTask.java -@@ -2,6 +2,7 @@ +@@ -2,6 +_,7 @@ import java.util.function.Consumer; import net.minecraft.network.protocol.Packet; @@ -8,7 +8,7 @@ public interface ConfigurationTask { void start(Consumer> p_294184_); -@@ -9,6 +10,10 @@ +@@ -9,6 +_,10 @@ ConfigurationTask.Type type(); public static record Type(String id) { diff --git a/patches/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch b/patches/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch index c6b74b9b79..2a31c2b200 100644 --- a/patches/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch +++ b/patches/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -12,16 +12,12 @@ +@@ -12,16 +_,12 @@ import net.minecraft.network.chat.Component; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.PacketUtils; @@ -20,7 +20,7 @@ import org.slf4j.Logger; public abstract class ServerCommonPacketListenerImpl implements ServerCommonPacketListener { -@@ -65,7 +61,7 @@ +@@ -65,7 +_,7 @@ @Override public void handlePong(ServerboundPongPacket p_295142_) { } @@ -29,7 +29,7 @@ @Override public void handleCustomPayload(ServerboundCustomPayloadPacket p_294276_) { } -@@ -108,8 +104,17 @@ +@@ -108,8 +_,17 @@ public void send(Packet p_294278_) { this.send(p_294278_, null); } @@ -48,7 +48,7 @@ boolean flag = !this.suspendFlushingOnServerThread || !this.server.isSameThread(); try { -@@ -121,7 +126,13 @@ +@@ -121,7 +_,13 @@ throw new ReportedException(crashreport); } } @@ -63,7 +63,7 @@ public void disconnect(Component p_294116_) { this.connection.send(new ClientboundDisconnectPacket(p_294116_), PacketSendListener.thenRun(() -> this.connection.disconnect(p_294116_))); this.connection.setReadOnly(); -@@ -143,7 +154,17 @@ +@@ -143,7 +_,17 @@ return this.latency; } diff --git a/patches/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java.patch b/patches/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java.patch index 7b9b792ab8..5412dcaab1 100644 --- a/patches/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java.patch +++ b/patches/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java -@@ -12,11 +12,7 @@ +@@ -12,11 +_,7 @@ import net.minecraft.network.TickablePacketListener; import net.minecraft.network.chat.Component; import net.minecraft.network.protocol.PacketUtils; @@ -13,7 +13,7 @@ import net.minecraft.network.protocol.common.custom.BrandPayload; import net.minecraft.network.protocol.configuration.ClientboundRegistryDataPacket; import net.minecraft.network.protocol.configuration.ClientboundUpdateEnabledFeaturesPacket; -@@ -31,6 +27,10 @@ +@@ -31,6 +_,10 @@ import net.minecraft.server.players.PlayerList; import net.minecraft.tags.TagNetworkSerialization; import net.minecraft.world.flag.FeatureFlags; @@ -24,7 +24,7 @@ import org.slf4j.Logger; public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketListenerImpl implements TickablePacketListener, ServerConfigurationPacketListener { -@@ -41,6 +41,8 @@ +@@ -41,6 +_,8 @@ @Nullable private ConfigurationTask currentTask; private ClientInformation clientInformation; @@ -33,7 +33,7 @@ public ServerConfigurationPacketListenerImpl(MinecraftServer p_294645_, Connection p_295787_, CommonListenerCookie p_302003_) { super(p_294645_, p_295787_, p_302003_); -@@ -65,6 +67,11 @@ +@@ -65,6 +_,11 @@ } public void startConfiguration() { @@ -45,7 +45,7 @@ this.send(new ClientboundCustomPayloadPacket(new BrandPayload(this.server.getServerModName()))); LayeredRegistryAccess layeredregistryaccess = this.server.registries(); this.send(new ClientboundUpdateEnabledFeaturesPacket(FeatureFlags.REGISTRY.toNames(this.server.getWorldData().enabledFeatures()))); -@@ -86,6 +93,10 @@ +@@ -86,6 +_,10 @@ private void addOptionalTasks() { this.server.getServerResourcePack().ifPresent(p_296496_ -> this.configurationTasks.add(new ServerResourcePackConfigurationTask(p_296496_))); @@ -56,7 +56,7 @@ } @Override -@@ -100,7 +111,40 @@ +@@ -100,7 +_,40 @@ this.finishCurrentTask(ServerResourcePackConfigurationTask.TYPE); } } @@ -98,7 +98,7 @@ @Override public void handleConfigurationFinished(ServerboundFinishConfigurationPacket p_294283_) { this.connection.suspendInboundAfterProtocolChange(); -@@ -121,7 +165,7 @@ +@@ -121,7 +_,7 @@ } ServerPlayer serverplayer = playerlist.getPlayerForLogin(this.gameProfile, this.clientInformation); @@ -107,7 +107,7 @@ this.connection.resumeInboundAfterProtocolChange(); } catch (Exception exception) { LOGGER.error("Couldn't place player in world", (Throwable)exception); -@@ -147,7 +191,8 @@ +@@ -147,7 +_,8 @@ } } @@ -117,7 +117,7 @@ ConfigurationTask.Type configurationtask$type = this.currentTask != null ? this.currentTask.type() : null; if (!p_294853_.equals(configurationtask$type)) { throw new IllegalStateException("Unexpected request for task finish, current task: " + configurationtask$type + ", requested: " + p_294853_); -@@ -155,5 +200,15 @@ +@@ -155,5 +_,15 @@ this.currentTask = null; this.startNextTask(); } diff --git a/patches/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch b/patches/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch index 2cbccc52fb..fd61b78502 100644 --- a/patches/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch +++ b/patches/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -60,6 +60,7 @@ +@@ -60,6 +_,7 @@ import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.PacketUtils; import net.minecraft.network.protocol.common.ServerboundClientInformationPacket; @@ -8,7 +8,7 @@ import net.minecraft.network.protocol.game.ClientboundBlockChangedAckPacket; import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket; import net.minecraft.network.protocol.game.ClientboundCommandSuggestionsPacket; -@@ -186,6 +187,12 @@ +@@ -186,6 +_,12 @@ ServerPlayerConnection, TickablePacketListener { static final Logger LOGGER = LogUtils.getLogger(); @@ -21,7 +21,7 @@ public static final double MAX_INTERACTION_DISTANCE = Mth.square(6.0); private static final int NO_BLOCK_UPDATES_TO_ACK = -1; private static final int TRACKED_MESSAGE_DISCONNECT_THRESHOLD = 4096; -@@ -228,6 +235,8 @@ +@@ -228,6 +_,8 @@ private final MessageSignatureCache messageSignatureCache = MessageSignatureCache.createDefault(); private final FutureChain chatMessageChain; private boolean waitingForSwitchToConfig; @@ -30,7 +30,7 @@ public ServerGamePacketListenerImpl(MinecraftServer p_9770_, Connection p_9771_, ServerPlayer p_9772_, CommonListenerCookie p_301978_) { super(p_9770_, p_9771_, p_301978_); -@@ -240,6 +249,7 @@ +@@ -240,6 +_,7 @@ ? SignedMessageChain.Decoder.REJECT_ALL : SignedMessageChain.Decoder.unsigned(p_9772_.getUUID()); this.chatMessageChain = new FutureChain(p_9770_); @@ -38,7 +38,7 @@ } @Override -@@ -426,9 +436,11 @@ +@@ -426,9 +_,11 @@ } entity.absMoveTo(d3, d4, d5, f, f1); @@ -50,7 +50,7 @@ this.send(new ClientboundMoveVehiclePacket(entity)); return; } -@@ -1004,8 +1016,10 @@ +@@ -1004,8 +_,10 @@ case SWAP_ITEM_WITH_OFFHAND: if (!this.player.isSpectator()) { ItemStack itemstack = this.player.getItemInHand(InteractionHand.OFF_HAND); @@ -63,7 +63,7 @@ this.player.stopUsingItem(); } -@@ -1033,7 +1047,7 @@ +@@ -1033,7 +_,7 @@ .handleBlockBreakAction( blockpos, serverboundplayeractionpacket$action, p_9889_.getDirection(), this.player.level().getMaxBuildHeight(), p_9889_.getSequence() ); @@ -72,7 +72,7 @@ return; default: throw new IllegalArgumentException("Invalid player action"); -@@ -1052,7 +1066,7 @@ +@@ -1052,7 +_,7 @@ @Override public void handleUseItemOn(ServerboundUseItemOnPacket p_9930_) { PacketUtils.ensureRunningOnSameThread(p_9930_, this, this.player.serverLevel()); @@ -81,7 +81,7 @@ ServerLevel serverlevel = this.player.serverLevel(); InteractionHand interactionhand = p_9930_.getHand(); ItemStack itemstack = this.player.getItemInHand(interactionhand); -@@ -1061,7 +1075,7 @@ +@@ -1061,7 +_,7 @@ Vec3 vec3 = blockhitresult.getLocation(); BlockPos blockpos = blockhitresult.getBlockPos(); Vec3 vec31 = Vec3.atCenterOf(blockpos); @@ -90,7 +90,7 @@ Vec3 vec32 = vec3.subtract(vec31); double d0 = 1.0000001; if (Math.abs(vec32.x()) < 1.0000001 && Math.abs(vec32.y()) < 1.0000001 && Math.abs(vec32.z()) < 1.0000001) { -@@ -1070,17 +1084,17 @@ +@@ -1070,17 +_,17 @@ int i = this.player.level().getMaxBuildHeight(); if (blockpos.getY() < i) { if (this.awaitingPositionFromClient == null @@ -119,7 +119,7 @@ } } } else { -@@ -1196,9 +1210,12 @@ +@@ -1196,9 +_,12 @@ } CompletableFuture completablefuture = this.filterTextPacket(playerchatmessage.signedContent()); @@ -134,7 +134,7 @@ this.broadcastChatMessage(playerchatmessage1); }, p_300782_)); }); -@@ -1466,7 +1483,7 @@ +@@ -1466,7 +_,7 @@ } AABB aabb = entity.getBoundingBox(); @@ -143,7 +143,7 @@ p_9866_.dispatch( new ServerboundInteractPacket.Handler() { private void performInteraction(InteractionHand p_143679_, ServerGamePacketListenerImpl.EntityInteraction p_143680_) { -@@ -1731,7 +1748,7 @@ +@@ -1731,7 +_,7 @@ throw new IllegalStateException("Client acknowledged config, but none was requested"); } else { this.connection @@ -152,7 +152,7 @@ } } -@@ -1766,5 +1783,16 @@ +@@ -1766,5 +_,16 @@ @FunctionalInterface interface EntityInteraction { InteractionResult run(ServerPlayer p_143695_, Entity p_143696_, InteractionHand p_143697_);