Various minor

fix parallel threads for sponge
remove static modifier for some fields
This commit is contained in:
Jesse Boyd 2017-08-08 22:25:22 +10:00
parent 71306cb749
commit 7ba4e51a22
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
7 changed files with 38 additions and 6 deletions

View File

@ -123,6 +123,12 @@ public class Settings extends Config {
" - Having an artificial delay will use more CPU/Memory",
})
public int SPEED_REDUCTION = 0;
@Comment({
"Place chunks instead of individual blocks:",
" - Disabling this will negatively impact performance",
" - Only disable this for compatibility or cinematic placement",
})
public boolean FAST_PLACEMENT = true;
@Comment({
"Should WorldEdit use inventory?",
"0 = No inventory usage (creative)",
@ -130,10 +136,6 @@ public class Settings extends Config {
"2 = Inventory for placing (survival)",
})
public int INVENTORY_MODE = 0;
@Comment({
"Place chunks instead of individual blocks"
})
public boolean FAST_PLACEMENT = true;
@Comment({
"Should large edits require confirmation (>16384 chunks)",
})
@ -271,7 +273,7 @@ public class Settings extends Config {
" - E.g. A plugin creates an EditSession but never does anything with it",
" - This only applies to plugins improperly using WorldEdit's legacy API"
})
public static int DISCARD_AFTER_MS = 60000;
public int DISCARD_AFTER_MS = 60000;
public static class PROGRESS {
@Comment({"Display constant titles about the progress of a user's edit",
@ -377,7 +379,7 @@ public class Settings extends Config {
" - 1 = Optimal (Relight changed light sources and changed blocks)",
" - 2 = All (Slowly relight every blocks)"
})
public static int MODE = 1;
public int MODE = 1;
}
public void reload(File file) {

View File

@ -1,6 +1,7 @@
package com.boydti.fawe.forge;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FaweCommand;
import com.boydti.fawe.object.FawePlayer;
import java.io.File;
@ -32,6 +33,10 @@ public class ForgeMain {
MinecraftForge.EVENT_BUS.register(this);
FMLCommonHandler.instance().bus().register(this);
this.IMP = new FaweForge(this, event.getModLog(), event.getModMetadata(), directory);
try {
Class.forName("org.spongepowered.api.Sponge");
Settings.IMP.QUEUE.PARALLEL_THREADS = 1;
} catch (Throwable ignore) {}
}
@Mod.EventHandler

View File

@ -1,6 +1,7 @@
package com.boydti.fawe.forge;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FaweCommand;
import com.boydti.fawe.object.FawePlayer;
import java.io.File;
@ -31,6 +32,10 @@ public class ForgeMain {
MinecraftForge.EVENT_BUS.register(this);
FMLCommonHandler.instance().bus().register(this);
this.IMP = new FaweForge(this, event.getModLog(), event.getModMetadata(), directory);
try {
Class.forName("org.spongepowered.api.Sponge");
Settings.IMP.QUEUE.PARALLEL_THREADS = 1;
} catch (Throwable ignore) {}
}
@Mod.EventHandler

View File

@ -1,6 +1,7 @@
package com.boydti.fawe.forge;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FaweCommand;
import com.boydti.fawe.object.FawePlayer;
import java.io.File;
@ -31,6 +32,10 @@ public class ForgeMain {
MinecraftForge.EVENT_BUS.register(this);
FMLCommonHandler.instance().bus().register(this);
this.IMP = new FaweForge(this, event.getModLog(), event.getModMetadata(), directory);
try {
Class.forName("org.spongepowered.api.Sponge");
Settings.IMP.QUEUE.PARALLEL_THREADS = 1;
} catch (Throwable ignore) {}
}
@Mod.EventHandler

View File

@ -1,6 +1,7 @@
package com.boydti.fawe.forge;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FawePlayer;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
@ -31,6 +32,10 @@ public class ForgeMain {
MinecraftForge.EVENT_BUS.register(this);
FMLCommonHandler.instance().bus().register(this);
this.IMP = new FaweForge(this, event.getModLog(), event.getModMetadata(), directory);
try {
Class.forName("org.spongepowered.api.Sponge");
Settings.IMP.QUEUE.PARALLEL_THREADS = 1;
} catch (Throwable ignore) {}
}
@Mod.EventHandler

View File

@ -1,6 +1,7 @@
package com.boydti.fawe.forge;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FawePlayer;
import java.io.File;
import java.util.List;
@ -31,6 +32,10 @@ public class ForgeMain {
MinecraftForge.EVENT_BUS.register(this);
FMLCommonHandler.instance().bus().register(this);
this.IMP = new FaweForge(this, event.getModLog(), event.getModMetadata(), directory);
try {
Class.forName("org.spongepowered.api.Sponge");
Settings.IMP.QUEUE.PARALLEL_THREADS = 1;
} catch (Throwable ignore) {}
}
@Mod.EventHandler

View File

@ -1,6 +1,7 @@
package com.boydti.fawe.forge;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FawePlayer;
import java.io.File;
import java.util.List;
@ -30,6 +31,10 @@ public class ForgeMain {
MinecraftForge.EVENT_BUS.register(this);
FMLCommonHandler.instance().bus().register(this);
this.IMP = new FaweForge(this, event.getModLog(), event.getModMetadata(), directory);
try {
Class.forName("org.spongepowered.api.Sponge");
Settings.IMP.QUEUE.PARALLEL_THREADS = 1;
} catch (Throwable ignore) {}
}
@Mod.EventHandler