From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: AlphaKR93 Date: Wed, 27 Sep 2023 16:42:17 +0900 Subject: [PATCH] Optimize default configurations [REFERENCE] - YouHaveTrouble/minecraft-optimization - AkiraDevelopment/SimplyMC - YouHaveTrouble/minecraft-exploits-and-how-to-fix-them diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java index cba3d725245223c5d9e8e59dcceec61f0acc1b85..63af4c9e2bc662e08ebf858d84933b3e4e3b92cb 100644 --- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java +++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java @@ -72,7 +72,7 @@ public class PufferfishConfig { getString("info.version", "1.0"); setComment("info", "Pufferfish Configuration", - "Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host", + // "Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host", // Plazma - Sponsorblock "Join our Discord for support: https://discord.gg/reZw4vQV9H", "Download new builds at https://ci.pufferfish.host/job/Pufferfish"); @@ -227,7 +227,7 @@ public class PufferfishConfig { public static int maxProjectileLoadsPerTick; public static int maxProjectileLoadsPerProjectile; private static void projectileLoading() { - maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick."); + maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick."); maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed."); setComment("projectile", "Optimizes projectile settings"); @@ -241,12 +241,12 @@ public class PufferfishConfig { public static int activationDistanceMod; private static void dynamicActivationOfBrains() throws IOException { - dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", false); // Purpur + dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()); // Purpur startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12, "This value determines how far away an entity has to be", "from the player to start being effected by DEAR."); startDistanceSquared = startDistance * startDistance; - maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", 20, + maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 7 : 8, "This value defines how often in ticks, the furthest entity", "will get their pathfinders and behaviors ticked. 20 = 1s"); activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", 8, @@ -269,8 +269,18 @@ public class PufferfishConfig { public static Map projectileTimeouts; private static void projectileTimeouts() { // Set some defaults - getInt("entity_timeouts.SNOWBALL", -1); - getInt("entity_timeouts.LLAMA_SPIT", -1); + // Plazma start - Optimize default configurations + if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) { + getInt("entity_timeouts.ARROW", 200); + getInt("entity_timeouts.EGG", 200); + getInt("entity_timeouts.ENDER_PEARL", 200); + getInt("entity_timeouts.SNOWBALL", 200); + getInt("entity_timeouts.LLAMA_SPIT", 200); + } else { + getInt("entity_timeouts.SNOWBALL", -1); + getInt("entity_timeouts.LLAMA_SPIT", -1); + } + // Plazma end - Optimize default configurations setComment("entity_timeouts", "These values define a entity's maximum lifespan. If an", "entity is in this list and it has survived for longer than", diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java index 32035e37b39ba42232fea948166e7c1d4d06190c..8445a0b25d647b2c1f9a44f849084cdec0842e18 100644 --- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java @@ -167,7 +167,7 @@ public class GlobalConfiguration extends ConfigurationPart { public class Watchdog extends ConfigurationPart { public int earlyWarningEvery = 5000; - public int earlyWarningDelay = 10000; + public int earlyWarningDelay = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 180000 : 10000; // Plazma - Optimize default configurations } public SpamLimiter spamLimiter; @@ -207,7 +207,7 @@ public class GlobalConfiguration extends ConfigurationPart { public Commands commands; public class Commands extends ConfigurationPart { - public boolean suggestPlayerNamesWhenNullTabCompletions = true; + public boolean suggestPlayerNamesWhenNullTabCompletions = !org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations public boolean fixTargetSelectorTagCompletion = true; public boolean timeCommandAffectsAllWorlds = false; } @@ -256,7 +256,7 @@ public class GlobalConfiguration extends ConfigurationPart { public BookSize bookSize; public class BookSize extends ConfigurationPart { - public int pageMax = 2560; // TODO this appears to be a duplicate setting with one above + public int pageMax = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 1024 : 2560; // TODO this appears to be a duplicate setting with one above // Plazma - Optimize default configurations public double totalMultiplier = 0.98D; // TODO this should probably be merged into the above inner class } public boolean resolveSelectorsInBooks = false; @@ -267,7 +267,15 @@ public class GlobalConfiguration extends ConfigurationPart { public class PacketLimiter extends ConfigurationPart { public Component kickMessage = Component.translatable("disconnect.exceeded_packet_rate", NamedTextColor.RED); public PacketLimit allPackets = new PacketLimit(7.0, 500.0, PacketLimit.ViolateAction.KICK); - public Map>, PacketLimit> overrides = Map.of(ServerboundPlaceRecipePacket.class, new PacketLimit(4.0, 5.0, PacketLimit.ViolateAction.DROP)); + // Plazma start - Optimize default configurations + public Map>, PacketLimit> overrides = new java.util.HashMap<>() {{ + put(ServerboundPlaceRecipePacket.class, new PacketLimit(4.0, 5.0, PacketLimit.ViolateAction.DROP)); + if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) { + put(net.minecraft.network.protocol.game.ServerboundCommandSuggestionPacket.class, new PacketLimit(1.0, 15.0, PacketLimit.ViolateAction.DROP)); + put(net.minecraft.network.protocol.game.ServerboundPlaceRecipePacket.class, new PacketLimit(4.0, 5.0, PacketLimit.ViolateAction.DROP)); + } + }}; + // Plazma end @ConfigSerializable public record PacketLimit(@Required double interval, @Required double maxPacketRate, ViolateAction action) { @@ -335,7 +343,7 @@ public class GlobalConfiguration extends ConfigurationPart { executor.setMaximumPoolSize(_chatExecutorMaxSize); } } - public int maxJoinsPerTick = 5; + public int maxJoinsPerTick = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 3 : 5; // Plazma - Optimize default configurations public boolean fixEntityPositionDesync = true; public boolean loadPermissionsYmlBeforePlugins = true; @Constraints.Min(4) diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java index efc91ff91827872c62b8bd060282549ccdcf67dd..1d926378887b9e42f1827e958f506be3e27d5ab5 100644 --- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java @@ -96,12 +96,32 @@ public class WorldConfiguration extends ConfigurationPart { public class AntiXray extends ConfigurationPart { public boolean enabled = false; - public EngineMode engineMode = EngineMode.HIDE; + public EngineMode engineMode = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? EngineMode.OBFUSCATE_LAYER : EngineMode.HIDE; // Plazma - Optimize default configurations public int maxBlockHeight = 64; public int updateRadius = 2; - public boolean lavaObscures = false; + public boolean lavaObscures = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations public boolean usePermission = false; - public List hiddenBlocks = List.of( + // Plazma start - Optimize default configurations + public List hiddenBlocks = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? List.of( + // + Blocks.AIR, + Blocks.COPPER_ORE, + Blocks.DEEPSLATE_COPPER_ORE, + Blocks.RAW_COPPER_BLOCK, + Blocks.IRON_ORE, + Blocks.DEEPSLATE_IRON_ORE, + Blocks.RAW_IRON_BLOCK, + Blocks.GOLD_ORE, + Blocks.DEEPSLATE_GOLD_ORE, + Blocks.RAW_GOLD_BLOCK, + Blocks.REDSTONE_ORE, + Blocks.DEEPSLATE_REDSTONE_ORE, + Blocks.LAPIS_ORE, + Blocks.DEEPSLATE_LAPIS_ORE, + Blocks.DIAMOND_ORE, + Blocks.DEEPSLATE_DIAMOND_ORE + // + ) : List.of( // Blocks.COPPER_ORE, Blocks.DEEPSLATE_COPPER_ORE, @@ -128,7 +148,28 @@ public class WorldConfiguration extends ConfigurationPart { Blocks.ENDER_CHEST // ); - public List replacementBlocks = List.of(Blocks.STONE, Blocks.OAK_PLANKS, Blocks.DEEPSLATE); + public List replacementBlocks = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? List.of( + // + Blocks.CHEST, + Blocks.AMETHYST_BLOCK, + Blocks.ANDESITE, + Blocks.BUDDING_AMETHYST, + Blocks.CALCITE, + Blocks.COAL_ORE, + Blocks.DEEPSLATE_COAL_ORE, + Blocks.DEEPSLATE, + Blocks.DIORITE, + Blocks.DIRT, + Blocks.EMERALD_ORE, + Blocks.GRANITE, + Blocks.GRAVEL, + Blocks.OAK_PLANKS, + Blocks.SMOOTH_BASALT, + Blocks.STONE, + Blocks.TUFF + // + ) : List.of(Blocks.STONE, Blocks.OAK_PLANKS, Blocks.DEEPSLATE); + // Plazma end } } @@ -151,14 +192,14 @@ public class WorldConfiguration extends ConfigurationPart { public ArmorStands armorStands; public class ArmorStands extends ConfigurationPart { - public boolean doCollisionEntityLookups = true; - public boolean tick = true; + public boolean doCollisionEntityLookups = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations + public boolean tick = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations } public Markers markers; public class Markers extends ConfigurationPart { - public boolean tick = true; + public boolean tick = !org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations } public Sniffer sniffer; @@ -181,7 +222,7 @@ public class WorldConfiguration extends ConfigurationPart { @MergeMap public Reference2IntMap spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1))); @MergeMap - public Map despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), category.getDespawnDistance()))); + public Map despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? (net.minecraft.server.MinecraftServer.getServer().server.getSimulationDistance() * 16) + 8 : category.getDespawnDistance()))); // Plazma - Optimize default configurations @MergeMap public Reference2IntMap ticksPerSpawn = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1))); @@ -382,7 +423,7 @@ public class WorldConfiguration extends ConfigurationPart { public class Environment extends ConfigurationPart { public boolean disableThunder = false; public boolean disableIceAndSnow = false; - public boolean optimizeExplosions = false; + public boolean optimizeExplosions = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations public boolean disableExplosionKnockback = false; public boolean generateFlatBedrock = false; public FrostedIce frostedIce; @@ -434,7 +475,7 @@ public class WorldConfiguration extends ConfigurationPart { public Fixes fixes; public class Fixes extends ConfigurationPart { - public boolean fixItemsMergingThroughWalls = false; + public boolean fixItemsMergingThroughWalls = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations public boolean disableUnloadedChunkEnderpearlExploit = true; public boolean preventTntFromMovingInWater = false; public boolean splitOverstackedLoot = true; @@ -462,9 +503,9 @@ public class WorldConfiguration extends ConfigurationPart { public class Collisions extends ConfigurationPart { public boolean onlyPlayersCollide = false; public boolean allowVehicleCollisions = true; - public boolean fixClimbingBypassingCrammingRule = false; + public boolean fixClimbingBypassingCrammingRule = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations @RequiresSpigotInitialization(MaxEntityCollisionsInitializer.class) - public int maxEntityCollisions = 8; + public int maxEntityCollisions = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 2 : 8; // Plazma - Optimize default configurations public boolean allowPlayerCrammingDamage = false; } @@ -472,18 +513,41 @@ public class WorldConfiguration extends ConfigurationPart { public class Chunks extends ConfigurationPart { public AutosavePeriod autoSaveInterval = AutosavePeriod.def(); - public int maxAutoSaveChunksPerTick = 24; + public int maxAutoSaveChunksPerTick = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 24; // Plazma - Optimize default configurations public int fixedChunkInhabitedTime = -1; - public boolean preventMovingIntoUnloadedChunks = false; + public boolean preventMovingIntoUnloadedChunks = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations public Duration delayChunkUnloadsBy = Duration.of("10s"); public Reference2IntMap> entityPerChunkSaveLimit = Util.make(new Reference2IntOpenHashMap<>(BuiltInRegistries.ENTITY_TYPE.size()), map -> { map.defaultReturnValue(-1); - map.put(EntityType.EXPERIENCE_ORB, -1); - map.put(EntityType.SNOWBALL, -1); - map.put(EntityType.ENDER_PEARL, -1); - map.put(EntityType.ARROW, -1); - map.put(EntityType.FIREBALL, -1); - map.put(EntityType.SMALL_FIREBALL, -1); + // Plazma start - Optimize default configurations + if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) { + map.put(EntityType.AREA_EFFECT_CLOUD, 8); + map.put(EntityType.ARROW, 16); + map.put(EntityType.DRAGON_FIREBALL, 3); + map.put(EntityType.EGG, 8); + map.put(EntityType.ENDER_PEARL, 8); + map.put(EntityType.EXPERIENCE_BOTTLE, 3); + map.put(EntityType.EXPERIENCE_ORB, 16); + map.put(EntityType.EYE_OF_ENDER, 8); + map.put(EntityType.FIREBALL, 8); + map.put(EntityType.FIREWORK_ROCKET, 8); + map.put(EntityType.LLAMA_SPIT, 3); + map.put(EntityType.POTION, 8); + map.put(EntityType.SHULKER_BULLET, 8); + map.put(EntityType.SMALL_FIREBALL, 8); + map.put(EntityType.SNOWBALL, 8); + map.put(EntityType.SPECTRAL_ARROW, 16); + map.put(EntityType.TRIDENT, 16); + map.put(EntityType.WITHER_SKULL, 4); + } else { + map.put(EntityType.EXPERIENCE_ORB, -1); + map.put(EntityType.SNOWBALL, -1); + map.put(EntityType.ENDER_PEARL, -1); + map.put(EntityType.ARROW, -1); + map.put(EntityType.FIREBALL, -1); + map.put(EntityType.SMALL_FIREBALL, -1); + } + // Plazma end }); public boolean flushRegionsOnSave = false; } @@ -498,9 +562,9 @@ public class WorldConfiguration extends ConfigurationPart { public TickRates tickRates; public class TickRates extends ConfigurationPart { - public int grassSpread = 1; + public int grassSpread = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 4 : 1; // Plazma - Optimize default configurations public int containerUpdate = 1; - public int mobSpawner = 1; + public int mobSpawner = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 2 : 1; // Plazma - Optimize default configurations public int wetFarmland = 1; public int dryFarmland = 1; public Table, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "secondarypoisensor", 40)); @@ -534,9 +598,9 @@ public class WorldConfiguration extends ConfigurationPart { public class Misc extends ConfigurationPart { public int lightQueueSize = 20; - public boolean updatePathfindingOnBlockUpdate = true; + public boolean updatePathfindingOnBlockUpdate = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations public boolean showSignClickCommandFailureMsgsToPlayer = false; - public RedstoneImplementation redstoneImplementation = RedstoneImplementation.VANILLA; + public RedstoneImplementation redstoneImplementation = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? RedstoneImplementation.ALTERNATE_CURRENT : RedstoneImplementation.VANILLA; // Plazma - Optimize default configurations public boolean disableEndCredits = false; public float maxLeashDistance = 10f; public boolean disableSprintInterruptionOnAttack = false; diff --git a/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java b/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java index 24763d3d270c29c95e0b3e85111145234f660a62..80ddc627e02e3c749e6b074afa93d357d9c7d62a 100644 --- a/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java +++ b/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java @@ -29,6 +29,7 @@ public class ArrowDespawnRate extends FallbackValue.Int { @Override protected int fallback() { + if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) return 100; // Plazma - Optimize default configurations return this.get(FallbackValue.SPIGOT_WORLD_CONFIG).arrowDespawnRate; } diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java index 4275364ada20fe5b67998ca1128322966dfc55e8..ab5607df7819bdc25d4856007122a6dce89857a9 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -163,7 +163,7 @@ public class Main { File configFile = (File) optionset.valueOf("bukkit-settings"); YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile); configuration.options().copyDefaults(true); - configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(Main.class.getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8))); + configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(Main.class.getClassLoader().getResourceAsStream(org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? "configurations/bukkit_optimized.yml" : "configurations/bukkit.yml"), Charsets.UTF_8))); // Plazma - Optimize default configurations configuration.save(configFile); File commandFile = (File) optionset.valueOf("commands-settings"); diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java index 09aa0c9ec7d66ff82167c035481e5fcccf8618de..3ed078e33a99e4cc7b536ab6590ef939ac2966db 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java @@ -131,14 +131,14 @@ public class DedicatedServerProperties extends Settings { return Mth.clamp(integer, 1, 29999984); }, 29999984); - this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag + this.syncChunkWrites = Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag // Plazma - Completely remove this setting this.regionFileComression = this.get("region-file-compression", "deflate"); this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false); this.enableStatus = this.get("enable-status", true); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 58878900a1985d4dd23104ac594d52368db580d5..6669851b5682d197a5ccc85ac3e68ea3baf428fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -428,7 +428,7 @@ public final class CraftServer implements Server { this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile()); this.configuration.options().copyDefaults(true); - this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8))); + this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? "configurations/bukkit_optimized.yml" : "configurations/bukkit.yml"), Charsets.UTF_8))); // Plazma - Optimize default configurations ConfigurationSection legacyAlias = null; if (!this.configuration.isString("aliases")) { legacyAlias = this.configuration.getConfigurationSection("aliases"); diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java index b02a0dddd99df1691c125660828a61cc4a5a4d02..d6ead6b1bc73df85a8e8938acd2e8465dd82df97 100644 --- a/src/main/java/org/plazmamc/plazma/Options.java +++ b/src/main/java/org/plazmamc/plazma/Options.java @@ -6,5 +6,6 @@ public interface Options { boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization"); boolean NO_WARN = getBoolean("Plazma.iKnowWhatIAmDoing"); + boolean AGGRESSIVE = Boolean.getBoolean("Plazma.aggressiveOptimize") && !NO_OPTIMIZE; } diff --git a/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java index 09053b4ccf268fd204c81dbb8d4f10fa9edcad5f..93f67f125b3674e645cfdae27e579e12d31a236e 100644 --- a/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java +++ b/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java @@ -35,6 +35,15 @@ public class PlazmaConfigurations extends Configurations