mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	ChunkProcessor auto trim and chunk unloading
- The auto trim drastically reduces the cost of players exploring on speed 10, as it prevents chunks of unowned plots from saving to disk when the chunk is unloaded - It is recommended to disable world auto saving, or also enable the chunk processor GC, as otherwise minecraft will also save chunks as they are loaded.
This commit is contained in:
		@@ -1838,6 +1838,8 @@ public class PS {
 | 
			
		||||
        
 | 
			
		||||
        // Chunk processor
 | 
			
		||||
        options.put("chunk-processor.enabled", Settings.CHUNK_PROCESSOR);
 | 
			
		||||
        options.put("chunk-processor.auto-unload", Settings.CHUNK_PROCESSOR_GC);
 | 
			
		||||
        options.put("chunk-processor.auto-trim", Settings.CHUNK_PROCESSOR_TRIM_ON_SAVE);
 | 
			
		||||
        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.disable-physics", Settings.CHUNK_PROCESSOR_DISABLE_PHYSICS);
 | 
			
		||||
@@ -1951,6 +1953,10 @@ public class PS {
 | 
			
		||||
        
 | 
			
		||||
        // Chunk processor
 | 
			
		||||
        Settings.CHUNK_PROCESSOR = config.getBoolean("chunk-processor.enabled");
 | 
			
		||||
        
 | 
			
		||||
        Settings.CHUNK_PROCESSOR_GC = config.getBoolean("chunk-processor.auto-unload");
 | 
			
		||||
        Settings.CHUNK_PROCESSOR_TRIM_ON_SAVE = config.getBoolean("chunk-processor.auto-trim");
 | 
			
		||||
        
 | 
			
		||||
        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_DISABLE_PHYSICS = config.getBoolean("chunk-processor.disable-physics");
 | 
			
		||||
 
 | 
			
		||||
@@ -68,6 +68,8 @@ public class Settings {
 | 
			
		||||
     * Chunk processor
 | 
			
		||||
     */
 | 
			
		||||
    public static boolean CHUNK_PROCESSOR = false;
 | 
			
		||||
    public static boolean CHUNK_PROCESSOR_TRIM_ON_SAVE = false;
 | 
			
		||||
    public static boolean CHUNK_PROCESSOR_GC = false;
 | 
			
		||||
    public static int CHUNK_PROCESSOR_MAX_BLOCKSTATES = 4096;
 | 
			
		||||
    public static int CHUNK_PROCESSOR_MAX_ENTITIES = 512;
 | 
			
		||||
    public static boolean CHUNK_PROCESSOR_DISABLE_PHYSICS = false;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user