revert this

This commit is contained in:
boy0001 2015-08-21 19:24:20 +10:00
parent 2185384746
commit 83b1be8944
3 changed files with 0 additions and 24 deletions

View File

@ -1838,7 +1838,6 @@ public class PS {
// Chunk processor // Chunk processor
options.put("chunk-processor.enabled", Settings.CHUNK_PROCESSOR); options.put("chunk-processor.enabled", Settings.CHUNK_PROCESSOR);
options.put("chunk-processor.random-chunk-unloads", Settings.CHUNK_PROCESSOR_RANDOM_CHUNK_UNLOADS);
options.put("chunk-processor.max-blockstates", Settings.CHUNK_PROCESSOR_MAX_BLOCKSTATES); options.put("chunk-processor.max-blockstates", Settings.CHUNK_PROCESSOR_MAX_BLOCKSTATES);
options.put("chunk-processor.max-entities", Settings.CHUNK_PROCESSOR_MAX_ENTITIES); options.put("chunk-processor.max-entities", Settings.CHUNK_PROCESSOR_MAX_ENTITIES);
options.put("chunk-processor.disable-physics", Settings.CHUNK_PROCESSOR_DISABLE_PHYSICS); options.put("chunk-processor.disable-physics", Settings.CHUNK_PROCESSOR_DISABLE_PHYSICS);
@ -1952,7 +1951,6 @@ public class PS {
// Chunk processor // Chunk processor
Settings.CHUNK_PROCESSOR = config.getBoolean("chunk-processor.enabled"); Settings.CHUNK_PROCESSOR = config.getBoolean("chunk-processor.enabled");
Settings.CHUNK_PROCESSOR_RANDOM_CHUNK_UNLOADS = config.getInt("chunk-processor.random-chunk-unloads");
Settings.CHUNK_PROCESSOR_MAX_BLOCKSTATES = config.getInt("chunk-processor.max-blockstates"); Settings.CHUNK_PROCESSOR_MAX_BLOCKSTATES = config.getInt("chunk-processor.max-blockstates");
Settings.CHUNK_PROCESSOR_MAX_ENTITIES = config.getInt("chunk-processor.max-entities"); Settings.CHUNK_PROCESSOR_MAX_ENTITIES = config.getInt("chunk-processor.max-entities");
Settings.CHUNK_PROCESSOR_DISABLE_PHYSICS = config.getBoolean("chunk-processor.disable-physics"); Settings.CHUNK_PROCESSOR_DISABLE_PHYSICS = config.getBoolean("chunk-processor.disable-physics");

View File

@ -69,7 +69,6 @@ public class Settings {
*/ */
public static boolean CHUNK_PROCESSOR = false; public static boolean CHUNK_PROCESSOR = false;
public static int CHUNK_PROCESSOR_MAX_BLOCKSTATES = 4096; public static int CHUNK_PROCESSOR_MAX_BLOCKSTATES = 4096;
public static int CHUNK_PROCESSOR_RANDOM_CHUNK_UNLOADS = 1;
public static int CHUNK_PROCESSOR_MAX_ENTITIES = 512; public static int CHUNK_PROCESSOR_MAX_ENTITIES = 512;
public static boolean CHUNK_PROCESSOR_DISABLE_PHYSICS = false; public static boolean CHUNK_PROCESSOR_DISABLE_PHYSICS = false;
/** /**

View File

@ -30,27 +30,6 @@ public class ChunkListener implements Listener {
private long last = 0; private long last = 0;
private int count = 0; private int count = 0;
public ChunkListener() {
final PseudoRandom r = new PseudoRandom();
r.state = System.currentTimeMillis();
if (Settings.CHUNK_PROCESSOR_RANDOM_CHUNK_UNLOADS > 0) {
TaskManager.runTaskRepeat(new Runnable() {
@Override
public void run() {
for (World world : Bukkit.getWorlds()) {
if (!PS.get().isPlotWorld(world.getName())) {
continue;
}
Chunk[] chunks = world.getLoadedChunks();
for (int i = 0; i < Math.min(chunks.length, Settings.CHUNK_PROCESSOR_RANDOM_CHUNK_UNLOADS); i++) {
chunks[r.random(chunks.length)].unload(true, true);
}
}
}
}, 1);
}
}
@EventHandler @EventHandler
public void onChunkUnload(ChunkUnloadEvent event) { public void onChunkUnload(ChunkUnloadEvent event) {
if (processChunk(event.getChunk(), true)) { if (processChunk(event.getChunk(), true)) {