380 lines
20 KiB
Diff
380 lines
20 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: etil2jz <81570777+etil2jz@users.noreply.github.com>
|
|
Date: Sun, 8 May 2022 13:13:02 +0200
|
|
Subject: [PATCH] Optimize default values for configs
|
|
|
|
|
|
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
|
index 34eb43ca2bf446504c372f98dfbe6dbfd0a81369..74d86c1a9ef79e09b1ec02b93e8f62d3e0746d43 100644
|
|
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
|
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
|
@@ -217,7 +217,7 @@ public class PufferfishConfig {
|
|
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.");
|
|
- maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed.");
|
|
+ maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 8, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed."); // Mirai - optimize default values for configs
|
|
|
|
setComment("projectile", "Optimizes projectile settings");
|
|
}
|
|
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
|
index 54bca103347e89f116fb7fbf37449a32ac094286..76810d7767b1a66315b006569654c718105ab4ee 100644
|
|
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
|
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
|
@@ -55,7 +55,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
|
public boolean enabled = true;
|
|
public boolean reallyEnabled = false;
|
|
public boolean verbose = true;
|
|
- public String url = "https://timings.aikar.co/";
|
|
+ public String url = "https://timin.gs/"; // Mirai - optimize default values for configs
|
|
public boolean serverNamePrivacy = false;
|
|
public List<String> hiddenConfigEntries = List.of(
|
|
"database",
|
|
@@ -289,9 +289,9 @@ public class GlobalConfiguration extends ConfigurationPart {
|
|
public boolean fixEntityPositionDesync = true;
|
|
public boolean loadPermissionsYmlBeforePlugins = true;
|
|
@Constraints.Min(4)
|
|
- public int regionFileCacheSize = 256;
|
|
+ public int regionFileCacheSize = 512; // Mirai - optimize default values for configs
|
|
@Comment("See https://luckformula.emc.gs")
|
|
- public boolean useAlternativeLuckFormula = false;
|
|
+ public boolean useAlternativeLuckFormula = true; // Mirai - optimize default values for configs
|
|
public boolean lagCompensateBlockBreaking = true;
|
|
public boolean useDimensionTypeForCustomSpawners = false;
|
|
public boolean strictAdvancementDimensionCheck = false;
|
|
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
|
index 3d2e67dc559ee3910b17ca86a46030ec05232250..9fe2a3800f4cb2dc5a3148463144835f94db8a10 100644
|
|
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
|
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
|
@@ -113,8 +113,8 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
public ArmorStands armorStands;
|
|
|
|
public class ArmorStands extends ConfigurationPart {
|
|
- public boolean doCollisionEntityLookups = true;
|
|
- public boolean tick = true;
|
|
+ public boolean doCollisionEntityLookups = false; // Mirai - optimize default values for configs
|
|
+ public boolean tick = false; // Mirai - optimize default values for configs
|
|
}
|
|
|
|
public Spawning spawning;
|
|
@@ -197,8 +197,8 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
public Behavior behavior;
|
|
|
|
public class Behavior extends ConfigurationPart {
|
|
- public boolean disableChestCatDetection = false;
|
|
- public boolean spawnerNerfedMobsShouldJump = false;
|
|
+ public boolean disableChestCatDetection = true; // Mirai - optimize default values for configs
|
|
+ public boolean spawnerNerfedMobsShouldJump = true; // Mirai - optimize default values for configs
|
|
public int experienceMergeMaxValue = -1;
|
|
public boolean shouldRemoveDragon = false;
|
|
public boolean zombiesTargetTurtleEggs = true;
|
|
@@ -241,7 +241,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
public boolean enderDragonsDeathAlwaysPlacesDragonEgg = false;
|
|
public boolean phantomsDoNotSpawnOnCreativePlayers = true;
|
|
public boolean phantomsOnlyAttackInsomniacs = true;
|
|
- public boolean parrotsAreUnaffectedByPlayerMovement = false;
|
|
+ public boolean parrotsAreUnaffectedByPlayerMovement = true; // Mirai - optimize default values for configs
|
|
public double zombieVillagerInfectionChance = -1.0;
|
|
public MobsCanAlwaysPickUpLoot mobsCanAlwaysPickUpLoot;
|
|
|
|
@@ -251,7 +251,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
}
|
|
|
|
public boolean disablePlayerCrits = false;
|
|
- public boolean nerfPigmenFromNetherPortals = false;
|
|
+ public boolean nerfPigmenFromNetherPortals = true; // Mirai - optimize default values for configs
|
|
public PillagerPatrols pillagerPatrols;
|
|
|
|
public class PillagerPatrols extends ConfigurationPart {
|
|
@@ -309,7 +309,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 = true; // Mirai - optimize default values for configs
|
|
public boolean disableExplosionKnockback = false;
|
|
public boolean generateFlatBedrock = false;
|
|
public FrostedIce frostedIce;
|
|
@@ -354,7 +354,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
|
|
public class Maps extends ConfigurationPart {
|
|
public int itemFrameCursorLimit = 128;
|
|
- public int itemFrameCursorUpdateInterval = 10;
|
|
+ public int itemFrameCursorUpdateInterval = 20; // Mirai - optimize default values for configs
|
|
}
|
|
|
|
public Fixes fixes;
|
|
@@ -380,7 +380,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
public class Hopper extends ConfigurationPart {
|
|
public boolean cooldownWhenFull = true;
|
|
public boolean disableMoveEvent = false;
|
|
- public boolean ignoreOccludingBlocks = false;
|
|
+ public boolean ignoreOccludingBlocks = true; // Mirai - optimize default values for configs
|
|
}
|
|
|
|
public Collisions collisions;
|
|
@@ -388,9 +388,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 = true; // Mirai - optimize default values for configs
|
|
@RequiresSpigotInitialization(MaxEntityCollisionsInitializer.class)
|
|
- public int maxEntityCollisions = 8;
|
|
+ public int maxEntityCollisions = 2; // Mirai - optimize default values for configs
|
|
public boolean allowPlayerCrammingDamage = false;
|
|
}
|
|
|
|
@@ -398,18 +398,32 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
|
|
public class Chunks extends ConfigurationPart {
|
|
public AutosavePeriod autoSaveInterval = AutosavePeriod.def();
|
|
- public int maxAutoSaveChunksPerTick = 24;
|
|
+ public int maxAutoSaveChunksPerTick = 12; // Mirai - optimize default values for configs
|
|
public int fixedChunkInhabitedTime = -1;
|
|
- public boolean preventMovingIntoUnloadedChunks = false;
|
|
- public Duration delayChunkUnloadsBy = Duration.of("10s");
|
|
+ public boolean preventMovingIntoUnloadedChunks = true; // Mirai - optimize default values for configs
|
|
+ public Duration delayChunkUnloadsBy = Duration.of("5s"); // Mirai - optimize default values for configs
|
|
public Reference2IntMap<EntityType<?>> entityPerChunkSaveLimit = Util.make(new Reference2IntOpenHashMap<>(Registry.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);
|
|
+ // Mirai start - optimize default values for configs
|
|
+ map.put(EntityType.EXPERIENCE_ORB, 16);
|
|
+ map.put(EntityType.SNOWBALL, 8);
|
|
+ map.put(EntityType.ENDER_PEARL, 8);
|
|
+ map.put(EntityType.ARROW, 16);
|
|
+ map.put(EntityType.FIREBALL, 8);
|
|
+ map.put(EntityType.SMALL_FIREBALL, 8);
|
|
+ map.put(EntityType.DRAGON_FIREBALL, 3);
|
|
+ map.put(EntityType.EGG, 8);
|
|
+ map.put(EntityType.EYE_OF_ENDER, 8);
|
|
+ map.put(EntityType.FIREWORK_ROCKET, 8);
|
|
+ map.put(EntityType.POTION, 8);
|
|
+ map.put(EntityType.LLAMA_SPIT, 3);
|
|
+ map.put(EntityType.SHULKER_BULLET, 8);
|
|
+ map.put(EntityType.SPECTRAL_ARROW, 16);
|
|
+ map.put(EntityType.EXPERIENCE_BOTTLE, 3);
|
|
+ map.put(EntityType.TRIDENT, 16);
|
|
+ map.put(EntityType.WITHER_SKULL, 4);
|
|
+ map.put(EntityType.AREA_EFFECT_CLOUD, 8);
|
|
+ // Mirai end
|
|
});
|
|
}
|
|
|
|
@@ -423,11 +437,22 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
public TickRates tickRates;
|
|
|
|
public class TickRates extends ConfigurationPart {
|
|
- public int grassSpread = 1;
|
|
- public int containerUpdate = 1;
|
|
- public int mobSpawner = 1;
|
|
- public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "secondarypoisensor", 40));
|
|
- public Table<EntityType<?>, String, Integer> behavior = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "validatenearbypoi", -1));
|
|
+ // Mirai start - optimize default values for configs
|
|
+ public int grassSpread = 4;
|
|
+ public int containerUpdate = 3;
|
|
+ public int mobSpawner = 2;
|
|
+ public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> {
|
|
+ table.put(EntityType.VILLAGER, "secondarypoisensor", 80);
|
|
+ table.put(EntityType.VILLAGER, "nearestbedsensor", 80);
|
|
+ table.put(EntityType.VILLAGER, "villagerbabiessensor", 40);
|
|
+ table.put(EntityType.VILLAGER, "playersensor", 40);
|
|
+ table.put(EntityType.VILLAGER, "nearestlivingentitysensor", 40);
|
|
+ });
|
|
+ public Table<EntityType<?>, String, Integer> behavior = Util.make(HashBasedTable.create(), table -> {
|
|
+ table.put(EntityType.VILLAGER, "validatenearbypoi", 60);
|
|
+ table.put(EntityType.VILLAGER, "acquirepoi", 120);
|
|
+ });
|
|
+ // Mirai end
|
|
}
|
|
|
|
@Setting(FeatureSeedsGeneration.FEATURE_SEEDS_KEY)
|
|
@@ -435,7 +460,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
|
|
public class FeatureSeeds extends ConfigurationPart.Post {
|
|
@Setting(FeatureSeedsGeneration.GENERATE_KEY)
|
|
- public boolean generateRandomSeedsForAll = false;
|
|
+ public boolean generateRandomSeedsForAll = true; // Mirai - optimize default values for configs
|
|
@Setting(FeatureSeedsGeneration.FEATURES_KEY)
|
|
public Reference2LongMap<Holder<ConfiguredFeature<?, ?>>> features = new Reference2LongOpenHashMap<>();
|
|
|
|
@@ -449,9 +474,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
|
|
public class Misc extends ConfigurationPart {
|
|
public int lightQueueSize = 20;
|
|
- public boolean updatePathfindingOnBlockUpdate = true;
|
|
+ public boolean updatePathfindingOnBlockUpdate = false; // Mirai - optimize default values for configs
|
|
public boolean showSignClickCommandFailureMsgsToPlayer = false;
|
|
- public RedstoneImplementation redstoneImplementation = RedstoneImplementation.VANILLA;
|
|
+ public RedstoneImplementation redstoneImplementation = RedstoneImplementation.ALTERNATE_CURRENT; // Mirai - optimize default values for configs
|
|
public boolean disableEndCredits = false;
|
|
public float maxLeashDistance = 10f;
|
|
public boolean disableSprintInterruptionOnAttack = false;
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
index a5a2e497eb3e651f3e715f995a80161d919ebab9..6594d184940fd5b0a5418ce10c02ebe6540a4d0f 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -150,14 +150,14 @@ public class SpigotWorldConfig
|
|
public double itemMerge;
|
|
private void itemMerge()
|
|
{
|
|
- this.itemMerge = this.getDouble("merge-radius.item", 2.5 );
|
|
+ this.itemMerge = this.getDouble("merge-radius.item", 3.5 ); // Mirai - optimize default values for configs
|
|
this.log( "Item Merge Radius: " + this.itemMerge );
|
|
}
|
|
|
|
public double expMerge;
|
|
private void expMerge()
|
|
{
|
|
- this.expMerge = this.getDouble("merge-radius.exp", 3.0 );
|
|
+ this.expMerge = this.getDouble("merge-radius.exp", 4.0 ); // Mirai - optimize default values for configs
|
|
this.log( "Experience Merge Radius: " + this.expMerge );
|
|
}
|
|
|
|
@@ -196,7 +196,7 @@ public class SpigotWorldConfig
|
|
public byte mobSpawnRange;
|
|
private void mobSpawnRange()
|
|
{
|
|
- this.mobSpawnRange = (byte) getInt( "mob-spawn-range", 8 ); // Paper - Vanilla
|
|
+ this.mobSpawnRange = (byte) getInt( "mob-spawn-range", 2 ); // Paper - Vanilla // Mirai - optimize default values for configs
|
|
this.log( "Mob Spawn Range: " + this.mobSpawnRange );
|
|
}
|
|
|
|
@@ -207,14 +207,14 @@ public class SpigotWorldConfig
|
|
this.log( "Item Despawn Rate: " + this.itemDespawnRate );
|
|
}
|
|
|
|
- public int animalActivationRange = 32;
|
|
- public int monsterActivationRange = 32;
|
|
+ public int animalActivationRange = 16; // Mirai - optimize default values for configs
|
|
+ public int monsterActivationRange = 24; // Mirai - optimize default values for configs
|
|
public int raiderActivationRange = 48;
|
|
- public int miscActivationRange = 16;
|
|
+ public int miscActivationRange = 8; // Mirai - optimize default values for configs
|
|
// Paper start
|
|
public int flyingMonsterActivationRange = 32;
|
|
- public int waterActivationRange = 16;
|
|
- public int villagerActivationRange = 32;
|
|
+ public int waterActivationRange = 8; // Mirai - optimize default values for configs
|
|
+ public int villagerActivationRange = 16; // Mirai - optimize default values for configs
|
|
public int wakeUpInactiveAnimals = 4;
|
|
public int wakeUpInactiveAnimalsEvery = 60*20;
|
|
public int wakeUpInactiveAnimalsFor = 5*20;
|
|
@@ -231,7 +231,7 @@ public class SpigotWorldConfig
|
|
public int villagersWorkImmunityFor = 20;
|
|
public boolean villagersActiveForPanic = true;
|
|
// Paper end
|
|
- public boolean tickInactiveVillagers = true;
|
|
+ public boolean tickInactiveVillagers = false; // Mirai - optimize default values for configs
|
|
public boolean ignoreSpectatorActivation = false;
|
|
private void activationRange()
|
|
{
|
|
@@ -297,7 +297,7 @@ public class SpigotWorldConfig
|
|
{
|
|
this.set( "ticks-per.hopper-check", 1 );
|
|
}
|
|
- this.hopperCheck = this.getInt( "ticks-per.hopper-check", 1 );
|
|
+ this.hopperCheck = this.getInt( "ticks-per.hopper-check", 8 ); // Mirai - optimize default values for configs
|
|
this.hopperAmount = this.getInt( "hopper-amount", 1 );
|
|
this.hopperCanLoadChunks = this.getBoolean( "hopper-can-load-chunks", false );
|
|
this.log( "Hopper Transfer: " + this.hopperTransfer + " Hopper Check: " + this.hopperCheck + " Hopper Amount: " + this.hopperAmount + " Hopper Can Load Chunks: " + this.hopperCanLoadChunks );
|
|
@@ -307,7 +307,7 @@ public class SpigotWorldConfig
|
|
public int tridentDespawnRate;
|
|
private void arrowDespawnRate()
|
|
{
|
|
- this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", 1200 );
|
|
+ this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", 300 ); // Mirai - optimize default values for configs
|
|
this.tridentDespawnRate = this.getInt( "trident-despawn-rate", this.arrowDespawnRate );
|
|
this.log( "Arrow Despawn Rate: " + this.arrowDespawnRate + " Trident Respawn Rate:" + this.tridentDespawnRate );
|
|
}
|
|
@@ -322,14 +322,14 @@ public class SpigotWorldConfig
|
|
public boolean nerfSpawnerMobs;
|
|
private void nerfSpawnerMobs()
|
|
{
|
|
- this.nerfSpawnerMobs = this.getBoolean( "nerf-spawner-mobs", false );
|
|
+ this.nerfSpawnerMobs = this.getBoolean( "nerf-spawner-mobs", true ); // Mirai - optimize default values for configs
|
|
this.log( "Nerfing mobs spawned from spawners: " + this.nerfSpawnerMobs );
|
|
}
|
|
|
|
public boolean enableZombiePigmenPortalSpawns;
|
|
private void enableZombiePigmenPortalSpawns()
|
|
{
|
|
- this.enableZombiePigmenPortalSpawns = this.getBoolean( "enable-zombie-pigmen-portal-spawns", true );
|
|
+ this.enableZombiePigmenPortalSpawns = this.getBoolean( "enable-zombie-pigmen-portal-spawns", false ); // Mirai - optimize default values for configs
|
|
this.log( "Allow Zombie Pigmen to spawn from portal blocks: " + this.enableZombiePigmenPortalSpawns );
|
|
}
|
|
|
|
@@ -443,7 +443,7 @@ public class SpigotWorldConfig
|
|
public int hangingTickFrequency;
|
|
private void hangingTickFrequency()
|
|
{
|
|
- this.hangingTickFrequency = this.getInt( "hanging-tick-frequency", 100 );
|
|
+ this.hangingTickFrequency = this.getInt( "hanging-tick-frequency", 200 ); // Mirai - optimize default values for configs
|
|
}
|
|
|
|
/* JettPack - remove tick limiter
|
|
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
|
|
index eef7c125b2689f29cae5464659eacdf33f5695b2..c6b04acb5371a0ac454c5e377bccad5b0972aed8 100644
|
|
--- a/src/main/resources/configurations/bukkit.yml
|
|
+++ b/src/main/resources/configurations/bukkit.yml
|
|
@@ -18,28 +18,28 @@ settings:
|
|
update-folder: update
|
|
plugin-profiling: false
|
|
connection-throttle: 4000
|
|
- query-plugins: true
|
|
+ query-plugins: false
|
|
deprecated-verbose: default
|
|
shutdown-message: Server closed
|
|
minimum-api: none
|
|
use-map-color-cache: true
|
|
spawn-limits:
|
|
- monsters: 70
|
|
- animals: 10
|
|
- water-animals: 5
|
|
- water-ambient: 20
|
|
- water-underground-creature: 5
|
|
- axolotls: 5
|
|
- ambient: 15
|
|
+ monsters: 20
|
|
+ animals: 5
|
|
+ water-animals: 2
|
|
+ water-ambient: 2
|
|
+ water-underground-creature: 3
|
|
+ axolotls: 3
|
|
+ ambient: 1
|
|
chunk-gc:
|
|
- period-in-ticks: 600
|
|
+ period-in-ticks: 400
|
|
ticks-per:
|
|
animal-spawns: 400
|
|
- monster-spawns: 1
|
|
- water-spawns: 1
|
|
- water-ambient-spawns: 1
|
|
- water-underground-creature-spawns: 1
|
|
- axolotl-spawns: 1
|
|
- ambient-spawns: 1
|
|
+ monster-spawns: 10
|
|
+ water-spawns: 400
|
|
+ water-ambient-spawns: 400
|
|
+ water-underground-creature-spawns: 400
|
|
+ axolotl-spawns: 400
|
|
+ ambient-spawns: 400
|
|
autosave: 6000
|
|
aliases: now-in-commands.yml
|
|
diff --git a/src/main/resources/configurations/commands.yml b/src/main/resources/configurations/commands.yml
|
|
index 18f54571200e2eca09a39b88f170fe7b99d8618f..1b57d51d92c5c69286800d10baeaa936fa208cae 100644
|
|
--- a/src/main/resources/configurations/commands.yml
|
|
+++ b/src/main/resources/configurations/commands.yml
|
|
@@ -12,5 +12,3 @@
|
|
command-block-overrides: []
|
|
ignore-vanilla-permissions: false
|
|
aliases:
|
|
- icanhasbukkit:
|
|
- - "version $1-"
|