2018-08-26 14:11:49 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								From f53a589e0196b116fe888b7cdadc4d356f122ba6 Mon Sep 17 00:00:00 2001
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 03:46:26 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								From: Zach Brown <zach.brown@destroystokyo.com>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Date: Thu, 3 Mar 2016 03:53:43 -0600
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Subject: [PATCH] Allow for toggling of spawn chunks
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
							 | 
						
					
						
							
								
									
										
										
										
											2018-08-26 14:11:49 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								index 02f7e506e3..cef0c47ac7 100644
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-23 20:24:44 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -108,4 +108,10 @@ public class PaperWorldConfig {
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								         softDespawnDistance = softDespawnDistance*softDespawnDistance;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								         hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								     }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    public boolean keepSpawnInMemory;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    private void keepSpawnInMemory() {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+        keepSpawnInMemory = getBoolean("keep-spawn-loaded", true);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+        log("Keep spawn chunk loaded: " + keepSpawnInMemory);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
							 | 
						
					
						
							
								
									
										
										
										
											2018-08-26 14:11:49 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								index c3c435cab9..30a46a50fb 100644
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								--- a/src/main/java/net/minecraft/server/World.java
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ b/src/main/java/net/minecraft/server/World.java
							 | 
						
					
						
							
								
									
										
										
										
											2018-08-26 14:11:49 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -207,6 +207,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 03:46:26 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								         this.getServer().addWorld(this.world);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								         // CraftBukkit end
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-24 21:59:37 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								         timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+        this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								         this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-24 21:59:37 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								     }
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								-- 
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-04 03:55:24 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								2.18.0
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-29 17:09:49 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 |