diff --git a/patches/server/0004-Pufferfish-Optimize-mob-spawning.patch b/patches/server/0004-Pufferfish-Optimize-mob-spawning.patch index 05898cd3..e684ed44 100644 --- a/patches/server/0004-Pufferfish-Optimize-mob-spawning.patch +++ b/patches/server/0004-Pufferfish-Optimize-mob-spawning.patch @@ -152,7 +152,7 @@ index 0000000000000000000000000000000000000000..65c3d2989e8140259c5720222c569129 +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 19d1e0dbee516e360381b6d7e1fee83e03ae9034..c62a225a97deca88a15f3d7c61550debdcbfccfe 100644 +index ff5c9492f2933cc9ba5a4e15998ba756497eac89..b2cb60cfffbe2b6c5ff4b29f8d242cfb00f6ebb6 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -297,6 +297,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entityType : BuiltInRegistries.ENTITY_TYPE) { + entityType.dabEnabled = true; // reset all, before setting the ones to true + } -+ getStringList("dab.blacklisted-entities", "activation-range.blacklisted-entities", Collections.emptyList(), "A list of entities to ignore for activation") ++ getStringList("performance.dab.blacklisted-entities", "dab.blacklisted-entities", Collections.emptyList(), "A list of entities to ignore for activation") + .forEach(name -> EntityType.byString(name).ifPresentOrElse(entityType -> { + entityType.dabEnabled = false; + }, () -> MinecraftServer.LOGGER.warn("Unknown entity \"" + name + "\""))); -+ setComment("dab", "Optimizes entity brains when", "they're far away from the player"); ++ setComment("performance.dab", "Optimizes entity brains when", "they're far away from the player"); } private static void network() { diff --git a/patches/server/0006-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch b/patches/server/0006-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch index af60545b..ebb35794 100644 --- a/patches/server/0006-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch +++ b/patches/server/0006-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch @@ -34,7 +34,7 @@ index 979b76d58d05c9d83dfae45d3052eea9431dfc65..1674f9accbbbb9ecdd99f05da6032398 } if (this.targetSelector.inactiveTick(this.activatedPriority, true)) { // Pufferfish - pass activated priority diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java -index 51738097440030b33579b483ebac75870e153e1b..955871484354d1a894afa52146e3ec354defd3b0 100644 +index 173c9d76c478a078b235e71707904ba58e0ec4f3..beb548a047b7dedabbd5a720102b7e0400cea6d8 100644 --- a/src/main/java/org/dreeam/leaf/LeafConfig.java +++ b/src/main/java/org/dreeam/leaf/LeafConfig.java @@ -174,6 +174,7 @@ public class LeafConfig { @@ -48,8 +48,8 @@ index 51738097440030b33579b483ebac75870e153e1b..955871484354d1a894afa52146e3ec35 @@ -214,6 +215,9 @@ public class LeafConfig { entityType.dabEnabled = false; }, () -> MinecraftServer.LOGGER.warn("Unknown entity \"" + name + "\""))); - setComment("dab", "Optimizes entity brains when", "they're far away from the player"); -+ throttleInactiveGoalSelectorTick = getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", true, + setComment("performance.dab", "Optimizes entity brains when", "they're far away from the player"); ++ throttleInactiveGoalSelectorTick = getBoolean("performance.inactive-goal-selector-throttle", "inactive-goal-selector-throttle", true, + "Throttles the AI goal selector in entity inactive ticks.", + "This can improve performance by a few percent, but has minor gameplay implications."); } diff --git a/patches/server/0007-Pufferfish-Entity-TTL.patch b/patches/server/0007-Pufferfish-Entity-TTL.patch index 41d083c1..3757f1d0 100644 --- a/patches/server/0007-Pufferfish-Entity-TTL.patch +++ b/patches/server/0007-Pufferfish-Entity-TTL.patch @@ -36,7 +36,7 @@ index 1679f0a3d095a7b758b468c77b6d3a4c078b7962..aa5cec6d56d7a8e80861aa4c9b4a74ca private String descriptionId; @Nullable diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java -index 955871484354d1a894afa52146e3ec354defd3b0..37399feb26f51c0f198124444ed427056e3f9da4 100644 +index beb548a047b7dedabbd5a720102b7e0400cea6d8..50d1e6e6240335cab5a7d3e5ce574b9e1e1ca0fb 100644 --- a/src/main/java/org/dreeam/leaf/LeafConfig.java +++ b/src/main/java/org/dreeam/leaf/LeafConfig.java @@ -17,6 +17,7 @@ import java.lang.reflect.Method; @@ -56,12 +56,12 @@ index 955871484354d1a894afa52146e3ec354defd3b0..37399feb26f51c0f198124444ed42705 String sentryEnvironment = System.getenv("SENTRY_DSN"); String sentryConfig = getString("performance.sentry-dsn", sentryDsn, "Sentry DSN for improved error logging, leave blank to disable", "Obtain from https://sentry.io/"); @@ -218,6 +220,18 @@ public class LeafConfig { - throttleInactiveGoalSelectorTick = getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", true, + throttleInactiveGoalSelectorTick = getBoolean("performance.inactive-goal-selector-throttle", "inactive-goal-selector-throttle", true, "Throttles the AI goal selector in entity inactive ticks.", "This can improve performance by a few percent, but has minor gameplay implications."); + // Set some defaults -+ getInt("entity_timeouts.SNOWBALL", -1); -+ getInt("entity_timeouts.LLAMA_SPIT", -1); ++ getInt("performance.entity_timeouts.SNOWBALL", -1); ++ getInt("performance.entity_timeouts.LLAMA_SPIT", -1); + 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/patches/server/0010-Purpur-Configurable-server-mod-name.patch b/patches/server/0010-Purpur-Configurable-server-mod-name.patch index ce469830..a58befdf 100644 --- a/patches/server/0010-Purpur-Configurable-server-mod-name.patch +++ b/patches/server/0010-Purpur-Configurable-server-mod-name.patch @@ -3,8 +3,6 @@ From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Mon, 17 Jul 2023 08:31:51 +0800 Subject: [PATCH] Purpur: Configurable server mod name -Original license: MIT -Original project: https://github.com/PurpurMC/Purpur diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 2758e02d6f3a66b2fdd47f1db69f71940ab7a81a..724c67fd1d534339d3006d92da613fec1efd42c9 100644 @@ -20,7 +18,7 @@ index 2758e02d6f3a66b2fdd47f1db69f71940ab7a81a..724c67fd1d534339d3006d92da613fec public SystemReport fillSystemReport(SystemReport details) { diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java -index 37399feb26f51c0f198124444ed427056e3f9da4..1a1c867b2602cc6a4dd63ad8c81d95f5ad4dd488 100644 +index 50d1e6e6240335cab5a7d3e5ce574b9e1e1ca0fb..3dafe7583b9d0fc66004eadcfb4ba37fd743f074 100644 --- a/src/main/java/org/dreeam/leaf/LeafConfig.java +++ b/src/main/java/org/dreeam/leaf/LeafConfig.java @@ -164,6 +164,11 @@ public class LeafConfig {