diff options
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.patch | 6 |
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 |