Paper/CraftBukkit-Patches/0078-Allow-Configuring-Chunks-per-Packet.patch

39 lines
1.6 KiB
Diff
Raw Normal View History

2015-03-08 12:04:41 +01:00
From 614cd119fb75a143a241b001669c3a96252f2965 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Tue, 28 Jan 2014 20:35:35 +1100
Subject: [PATCH] Allow Configuring Chunks per Packet
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
2015-02-28 12:36:22 +01:00
index 657f3f5..5751844 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
2015-02-28 12:36:22 +01:00
@@ -223,7 +223,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
Chunk chunk;
2014-11-28 02:17:45 +01:00
- while (iterator1.hasNext() && arraylist.size() < 10) {
+ while (iterator1.hasNext() && arraylist.size() < this.world.spigotConfig.maxBulkChunk) { // Spigot
ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) iterator1.next();
if (chunkcoordintpair != null) {
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
2015-02-26 11:40:16 +01:00
index 1971dbf..c7cb20c 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -266,4 +266,11 @@ public class SpigotWorldConfig
enableZombiePigmenPortalSpawns = getBoolean( "enable-zombie-pigmen-portal-spawns", true );
log( "Allow Zombie Pigmen to spawn from portal blocks: " + enableZombiePigmenPortalSpawns );
}
+
+ public int maxBulkChunk;
+ private void bulkChunkCount()
+ {
2014-11-28 02:17:45 +01:00
+ maxBulkChunk = getInt( "max-bulk-chunks", 10 );
+ log( "Sending up to " + maxBulkChunk + " chunks per packet" );
+ }
}
--
2014-11-28 02:17:45 +01:00
2.1.0