diff --git a/README.md b/README.md index 03da0342..c0e67e87 100644 --- a/README.md +++ b/README.md @@ -310,6 +310,7 @@ All changes are toggleable via config files. * **Memory Leak Fix:** Fixes memory leak when unloading worlds/switching dimensions * **Compact Machines** * **Invisible Wall Render Fix:** Fixes some compact machine walls being invisible if [Nothirium](https://www.curseforge.com/minecraft/mc-mods/nothirium) 0.2.x (and up) or [Vintagium](https://github.com/Asek3/sodium-1.12) is installed + * **Allowed Spawns Improvement:** Improves server performance by properly controlling spawn checks (effectiveness depends on CM's config) * **Effortless Building** * **Block Transmutation Fix:** Fixes Effortless Building ignoring Metadata when checking for items in inventory * **Elementary Staffs** diff --git a/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java b/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java index 20a957f3..0cc75935 100644 --- a/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java +++ b/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java @@ -399,6 +399,16 @@ public static class CompactMachinesCoreCategory @Config.Name("Invisible Wall Render Fix") @Config.Comment("Fixes some compact machine walls being invisible if Nothirium 0.2.x (and up) or Vintagium is installed") public boolean utCMRenderFixToggle = true; + + @Config.RequiresMcRestart + @Config.Name("Allowed Spawns Improvement") + @Config.Comment + ({ + "Improves server performance by properly controlling spawn checks (effectiveness depends on CM's config)", + "Disable both 'allowHostileSpawns' and 'allowPeacefulSpawns' in the CM config for best performance", + "Does nothing if both config values are true" + }) + public boolean utAllowedSpawnsImprovementToggle = true; } public static class EffortlessBuildingCategory diff --git a/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java b/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java index 3247a531..af75bb3a 100644 --- a/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java +++ b/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java @@ -51,8 +51,7 @@ public class UTMixinLoader implements ILateMixinLoader put("mixins.mods.codechickenlib.json", () -> loaded("codechickenlib") && UTConfigMods.CCL.utPacketLeakFixToggle); put("mixins.mods.cofhcore.json", () -> loaded("cofhcore")); put("mixins.mods.collective.json", () -> loaded("collective")); - // TODO: Add config - put("mixins.mods.compactmachines.spawns.json", () -> loaded("compactmachines3")); + put("mixins.mods.compactmachines.spawns.json", () -> loaded("compactmachines3") && UTConfigMods.COMPACT_MACHINES.utAllowedSpawnsImprovementToggle); put("mixins.mods.cqrepoured.json", () -> loaded("cqrepoured")); put("mixins.mods.effortlessbuilding.json", () -> loaded("effortlessbuilding")); put("mixins.mods.elementarystaffs.json", () -> loaded("element"));