mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
36 lines
1.7 KiB
Diff
36 lines
1.7 KiB
Diff
|
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||
|
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||
|
|
||
|
Chunk chunk;
|
||
|
|
||
|
- while (iterator1.hasNext() && arraylist.size() < PacketPlayOutMapChunkBulk.c()) {
|
||
|
+ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||
|
@@ -0,0 +0,0 @@ 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", 5 );
|
||
|
+ log( "Sending up to " + maxBulkChunk + " chunks per packet" );
|
||
|
+ }
|
||
|
}
|
||
|
--
|