Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
d28dd3edbd
Brought our multiple TNT change patches into a single patch and configuraiton section. You /will/ need to update your configs, sorry. Adds additional configuration and features as well.
38 Zeilen
1.9 KiB
Diff
38 Zeilen
1.9 KiB
Diff
From da87cfffb5d8d8c4d73a35760ededba300fc1c2c Mon Sep 17 00:00:00 2001
|
|
From: Dmck2b <itallhappenedverysuddenly@gmail.com>
|
|
Date: Fri, 28 Nov 2014 01:53:14 -0600
|
|
Subject: [PATCH] Allow for toggling of spawn chunks
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
index f85700f..60cdf2e 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -219,6 +219,7 @@ public abstract class World implements IBlockAccess {
|
|
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
|
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit
|
|
// CraftBukkit end
|
|
+ this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
|
|
// Spigot start
|
|
this.chunkTickRadius = (byte) ( ( this.getServer().getViewDistance() < 7 ) ? this.getServer().getViewDistance() : 7 );
|
|
this.chunkTickList = new gnu.trove.map.hash.TLongShortHashMap( spigotConfig.chunksPerTick * 5, 0.7f, Long.MIN_VALUE, Short.MIN_VALUE );
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
index 522a214..00303dc 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
@@ -139,4 +139,11 @@ public class PaperSpigotWorldConfig
|
|
softDespawnDistance = softDespawnDistance*softDespawnDistance;
|
|
hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
|
|
}
|
|
+
|
|
+ public boolean keepSpawnInMemory;
|
|
+ private void keepSpawnInMemory()
|
|
+ {
|
|
+ keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true );
|
|
+ log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.5.msysgit.0
|
|
|