mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
c7f1eed0bf
3beb7729816 a77ed5758a7 52c130fc6d9
39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
From 05a8cd92fb05669e40617582fb42ac7ac2b59a03 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
|
|
index fcefe68..dafd55c 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -220,7 +220,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
Chunk chunk;
|
|
|
|
- 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
|
|
index 5c1d59c..93ab1c1 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()
|
|
+ {
|
|
+ maxBulkChunk = getInt( "max-bulk-chunks", 10 );
|
|
+ log( "Sending up to " + maxBulkChunk + " chunks per packet" );
|
|
+ }
|
|
}
|
|
--
|
|
2.1.0
|
|
|