aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1029-Handle-Oversized-block-entities-in-chunks.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2024-04-06 18:52:05 -0700
committerJake Potrebic <[email protected]>2024-04-10 14:04:47 -0700
commitc1166f5d0d73723d8e7bad1a158a96a21835c5c2 (patch)
tree7af29e745260ce62664bfd2be7aaaf28c06eed60 /patches/server/1029-Handle-Oversized-block-entities-in-chunks.patch
parent5436d44bf2509ff89129f8790ee4643f09c72871 (diff)
downloadPaper-c1166f5d0d73723d8e7bad1a158a96a21835c5c2.tar.gz
Paper-c1166f5d0d73723d8e7bad1a158a96a21835c5c2.zip
Update patches to handle vineflower decompiler
Diffstat (limited to 'patches/server/1029-Handle-Oversized-block-entities-in-chunks.patch')
-rw-r--r--patches/server/1029-Handle-Oversized-block-entities-in-chunks.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/1029-Handle-Oversized-block-entities-in-chunks.patch b/patches/server/1029-Handle-Oversized-block-entities-in-chunks.patch
index 1bdb933b52..3705e1d295 100644
--- a/patches/server/1029-Handle-Oversized-block-entities-in-chunks.patch
+++ b/patches/server/1029-Handle-Oversized-block-entities-in-chunks.patch
@@ -9,7 +9,7 @@ creating too large of a packet to sed.
Co-authored-by: Spottedleaf <[email protected]>
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
-index 74b5cec09d953a247bc5aba3c4232a4c28ea1046..998deae645b4497c3285bfba3260c636439f9ecf 100644
+index 9c51c4d12bac588002f530f484ee89b094269349..761a8d4fb47f9bffdf9ca76fbae1003e8ae46a02 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
@@ -24,6 +24,14 @@ public class ClientboundLevelChunkPacketData {
@@ -33,7 +33,7 @@ index 74b5cec09d953a247bc5aba3c4232a4c28ea1046..998deae645b4497c3285bfba3260c636
this.blockEntitiesData = Lists.newArrayList();
+ int totalTileEntities = 0; // Paper - Handle oversized block entities in chunks
- for(Map.Entry<BlockPos, BlockEntity> entry2 : chunk.getBlockEntities().entrySet()) {
+ for (Entry<BlockPos, BlockEntity> entry2 : chunk.getBlockEntities().entrySet()) {
+ // Paper start - Handle oversized block entities in chunks
+ if (++totalTileEntities > TE_LIMIT) {
+ var packet = entry2.getValue().getUpdatePacket();
@@ -45,7 +45,7 @@ index 74b5cec09d953a247bc5aba3c4232a4c28ea1046..998deae645b4497c3285bfba3260c636
+ // Paper end - Handle oversized block entities in chunks
this.blockEntitiesData.add(ClientboundLevelChunkPacketData.BlockEntityInfo.create(entry2.getValue()));
}
-
+ }
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
index 6412dff5ed0505f62dd5b71ab9606257858a7317..fc230d835f9aa526a4b179d36d921f0fec348aa8 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java