diff --git a/patches/minecraft/net/minecraft/client/multiplayer/ClientPacketListener.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/ClientPacketListener.java.patch index 54150877c3..3e847199a3 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/ClientPacketListener.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/ClientPacketListener.java.patch @@ -85,7 +85,7 @@ this.f_104895_ = tagcontainer; if (!this.f_104885_.m_129531_()) { tagcontainer.m_13431_(); -@@ -1780,10 +_,12 @@ +@@ -1780,7 +_,8 @@ int i5 = friendlybytebuf.m_130242_(); this.f_104888_.f_91064_.f_173815_.m_173830_(positionsource, i5); } else { @@ -95,7 +95,3 @@ } } finally { if (friendlybytebuf != null) { -+ if (false) // Forge: let packet handle releasing buffer - friendlybytebuf.release(); - } - diff --git a/patches/minecraft/net/minecraft/network/protocol/game/ClientboundCustomPayloadPacket.java.patch b/patches/minecraft/net/minecraft/network/protocol/game/ClientboundCustomPayloadPacket.java.patch index 1465818887..5bfd5eb064 100644 --- a/patches/minecraft/net/minecraft/network/protocol/game/ClientboundCustomPayloadPacket.java.patch +++ b/patches/minecraft/net/minecraft/network/protocol/game/ClientboundCustomPayloadPacket.java.patch @@ -9,3 +9,11 @@ private static final int f_178834_ = 1048576; public static final ResourceLocation f_132012_ = new ResourceLocation("brand"); public static final ResourceLocation f_132013_ = new ResourceLocation("debug/path"); +@@ -52,6 +_,7 @@ + + public void m_5797_(ClientGamePacketListener p_132041_) { + p_132041_.m_7413_(this); ++ this.f_132030_.release(); // FORGE: Fix network buffer leaks (MC-121884) + } + + public ResourceLocation m_132042_() {