3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00
Paper/CraftBukkit-Patches/0076-Allow-Configuring-Chunks-per-Packet.patch
2015-06-05 05:26:00 -07:00

39 Zeilen
1.6 KiB
Diff

From 08991837f7535535ebb44db2c53864bf67adceb2 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 60dc7cd..9f1c122 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -223,7 +223,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 a684d68..ede9250 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -268,4 +268,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.4