From 23be3762bb7fe429c1f5ad49440252c30e280f26 Mon Sep 17 00:00:00 2001 From: AltronMaxX Date: Thu, 8 Aug 2024 14:51:04 +0400 Subject: [PATCH] remove some patches --- ...imize-random-calls-in-chunk-ticking.patch} | 0 ...0019-Pufferfish-Optimize-suffocation.patch | 91 ------- ...ferfish-Dynamic-Activation-of-Brain.patch} | 16 +- ....patch => 0021-Leaves-Protocol-Core.patch} | 0 ...h => 0022-Leaves-Appleskin-Protocol.patch} | 8 +- ...023-Gale-Faster-chunk-serialization.patch} | 0 ...kip-entity-move-if-movement-is-zero.patch} | 0 ...duce-acquire-POI-for-stuck-entities.patch} | 4 +- ...=> 0026-Gale-Optimize-sun-burn-tick.patch} | 0 ...rpur-Alternative-Keepalive-Handling.patch} | 8 +- ...patch => 0028-Purpur-Remove-timings.patch} | 2 +- ...g-for-piglin-spawn-in-nether-portal.patch} | 28 ++- ...-Virtual-Thread-for-async-scheduler.patch} | 8 +- ...0031-Carpet-Fixes-getBiome-Optimize.patch} | 0 ...parkly-Paper-Optimize-canSee-checks.patch} | 0 ...-MapItem-update-if-the-map-does-not.patch} | 8 +- ...-distanceToSqr-call-in-ServerEntity.patch} | 0 ...035-Leaf-Skip-event-if-no-listeners.patch} | 0 ...atch => 0036-Divine-lithium-ai.raid.patch} | 0 ...tity.fast_elytra_check-entity.fast_.patch} | 6 +- ...ed-server-showing-in-ping-before-se.patch} | 0 ...Add-linear-format-from-LinearPurpur.patch} | 12 +- ... => 0040-Change-profiler-permission.patch} | 0 ...40-Purpur-Lobotomize-stuck-villagers.patch | 223 ------------------ 24 files changed, 56 insertions(+), 358 deletions(-) rename patches/server/{0020-Pufferfish-Optimize-random-calls-in-chunk-ticking.patch => 0019-Pufferfish-Optimize-random-calls-in-chunk-ticking.patch} (100%) delete mode 100644 patches/server/0019-Pufferfish-Optimize-suffocation.patch rename patches/server/{0021-Pufferfish-Dynamic-Activation-of-Brain.patch => 0020-Pufferfish-Dynamic-Activation-of-Brain.patch} (97%) rename patches/server/{0022-Leaves-Protocol-Core.patch => 0021-Leaves-Protocol-Core.patch} (100%) rename patches/server/{0023-Leaves-Appleskin-Protocol.patch => 0022-Leaves-Appleskin-Protocol.patch} (95%) rename patches/server/{0024-Gale-Faster-chunk-serialization.patch => 0023-Gale-Faster-chunk-serialization.patch} (100%) rename patches/server/{0025-Gale-Skip-entity-move-if-movement-is-zero.patch => 0024-Gale-Skip-entity-move-if-movement-is-zero.patch} (100%) rename patches/server/{0026-Gale-Reduce-acquire-POI-for-stuck-entities.patch => 0025-Gale-Reduce-acquire-POI-for-stuck-entities.patch} (96%) rename patches/server/{0027-Gale-Optimize-sun-burn-tick.patch => 0026-Gale-Optimize-sun-burn-tick.patch} (100%) rename patches/server/{0028-Purpur-Alternative-Keepalive-Handling.patch => 0027-Purpur-Alternative-Keepalive-Handling.patch} (94%) rename patches/server/{0029-Purpur-Remove-timings.patch => 0028-Purpur-Remove-timings.patch} (99%) rename patches/server/{0030-Add-chance-config-for-piglin-spawn-in-nether-portal.patch => 0029-Add-chance-config-for-piglin-spawn-in-nether-portal.patch} (78%) rename patches/server/{0031-Leaf-Virtual-Thread-for-async-scheduler.patch => 0030-Leaf-Virtual-Thread-for-async-scheduler.patch} (94%) rename patches/server/{0032-Carpet-Fixes-getBiome-Optimize.patch => 0031-Carpet-Fixes-getBiome-Optimize.patch} (100%) rename patches/server/{0033-Sparkly-Paper-Optimize-canSee-checks.patch => 0032-Sparkly-Paper-Optimize-canSee-checks.patch} (100%) rename patches/server/{0034-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch => 0033-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch} (90%) rename patches/server/{0035-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch => 0034-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch} (100%) rename patches/server/{0036-Leaf-Skip-event-if-no-listeners.patch => 0035-Leaf-Skip-event-if-no-listeners.patch} (100%) rename patches/server/{0037-Divine-lithium-ai.raid.patch => 0036-Divine-lithium-ai.raid.patch} (100%) rename patches/server/{0038-Divine-lithium-entity.fast_elytra_check-entity.fast_.patch => 0037-Divine-lithium-entity.fast_elytra_check-entity.fast_.patch} (82%) rename patches/server/{0039-Purpur-Fix-outdated-server-showing-in-ping-before-se.patch => 0038-Purpur-Fix-outdated-server-showing-in-ping-before-se.patch} (100%) rename patches/server/{0041-Add-linear-format-from-LinearPurpur.patch => 0039-Add-linear-format-from-LinearPurpur.patch} (99%) rename patches/server/{0042-Change-profiler-permission.patch => 0040-Change-profiler-permission.patch} (100%) delete mode 100644 patches/server/0040-Purpur-Lobotomize-stuck-villagers.patch diff --git a/patches/server/0020-Pufferfish-Optimize-random-calls-in-chunk-ticking.patch b/patches/server/0019-Pufferfish-Optimize-random-calls-in-chunk-ticking.patch similarity index 100% rename from patches/server/0020-Pufferfish-Optimize-random-calls-in-chunk-ticking.patch rename to patches/server/0019-Pufferfish-Optimize-random-calls-in-chunk-ticking.patch diff --git a/patches/server/0019-Pufferfish-Optimize-suffocation.patch b/patches/server/0019-Pufferfish-Optimize-suffocation.patch deleted file mode 100644 index 445457e..0000000 --- a/patches/server/0019-Pufferfish-Optimize-suffocation.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AltronMaxX -Date: Tue, 6 Aug 2024 14:15:52 +0400 -Subject: [PATCH] Pufferfish-Optimize-suffocation - - -diff --git a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -index c8c6631093ff2ebd23527e80778b35f9c44cc8bf..8c8101d47376b9fb13652869401494c8b605620e 100644 ---- a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -+++ b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -@@ -25,6 +25,8 @@ public class FoldenorConfig { - - public static boolean sendNullEntityPackets = false; - -+ public static boolean enableSuffocationOptimization = false; -+ - public static void init(File configFile) { - init(configFile, true); - } -@@ -67,6 +69,8 @@ public class FoldenorConfig { - static void readConfig() { - readNetworkSettings(); - -+ readOptimizationSettings(); -+ - try { - config.save(CONFIG_FILE); - } catch (IOException ex) { -@@ -78,6 +82,14 @@ public class FoldenorConfig { - sendNullEntityPackets = getBoolean("network.send-null-entity-packets", sendNullEntityPackets); - } - -+ private static void readOptimizationSettings() { -+ enableSuffocationOptimization = getBoolean("optimizations.enable-suffocation-optimization", true, -+ "Optimizes the suffocation check by selectively skipping", -+ "the check in a way that still appears vanilla. This should", -+ "be left enabled on most servers, but is provided as a", -+ "configuration option if the vanilla deviation is undesirable."); -+ } -+ - protected static void set(String path, Object val) { - config.addDefault(path, val); - config.set(path, val); -diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b4fec6374803534aa3b5d5e7aec64f68c7c7c356..873e9b488a14866c99779a5b5e5f3d1c211febd6 100644 ---- a/src/main/java/net/minecraft/world/entity/LivingEntity.java -+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -463,7 +463,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - if (this.isAlive()) { - boolean flag = this instanceof net.minecraft.world.entity.player.Player; - -- if (!this.level().isClientSide) { -+ if (shouldCheckForSuffocation() && this.isInWall()) { // Pufferfish - optimize suffocation - if (this.isInWall()) { - this.hurt(this.damageSources().inWall(), 1.0F); - } else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) { -@@ -1428,6 +1428,16 @@ public abstract class LivingEntity extends Entity implements Attackable { - return this.getHealth() <= 0.0F; - } - -+ // Pufferfish start - optimize suffocation -+ public boolean couldPossiblyBeHurt(float amount) { -+ return !((float) this.invulnerableTime > (float) this.invulnerableDuration / 2.0F) || !(amount <= this.lastHurt); -+ } -+ -+ public boolean shouldCheckForSuffocation() { -+ return !net.edenor.foldenor.config.FoldenorConfig.enableSuffocationOptimization || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F)); -+ } -+ // Pufferfish end -+ - @Override - public boolean hurt(DamageSource source, float amount) { - if (this.isInvulnerableTo(source)) { -diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -index d3b4d492aee380dc17f4232d90eaae4f07bb9f86..82921c56c49edb0ca07425da563aa4876d4e6fb1 100644 ---- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -154,6 +154,13 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob - this.bossEvent.setName(this.getDisplayName()); - } - -+ // Pufferfish start - optimize suffocation -+ @Override -+ public boolean shouldCheckForSuffocation() { -+ return true; -+ } -+ // Pufferfish end -+ - @Override - protected SoundEvent getAmbientSound() { - return SoundEvents.WITHER_AMBIENT; diff --git a/patches/server/0021-Pufferfish-Dynamic-Activation-of-Brain.patch b/patches/server/0020-Pufferfish-Dynamic-Activation-of-Brain.patch similarity index 97% rename from patches/server/0021-Pufferfish-Dynamic-Activation-of-Brain.patch rename to patches/server/0020-Pufferfish-Dynamic-Activation-of-Brain.patch index 54fd303..b4bc6b9 100644 --- a/patches/server/0021-Pufferfish-Dynamic-Activation-of-Brain.patch +++ b/patches/server/0020-Pufferfish-Dynamic-Activation-of-Brain.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Pufferfish-Dynamic-Activation-of-Brain diff --git a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -index 8c8101d47376b9fb13652869401494c8b605620e..c36cac84603cd0c66c332eff8d55e16b7a5d3428 100644 +index c8c6631093ff2ebd23527e80778b35f9c44cc8bf..5b5a2491ec297c87458cf66171f5ed4c1e41e80d 100644 --- a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java +++ b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java @@ -2,6 +2,9 @@ package net.edenor.foldenor.config; @@ -26,9 +26,9 @@ index 8c8101d47376b9fb13652869401494c8b605620e..c36cac84603cd0c66c332eff8d55e16b import java.util.List; import java.util.Map; import java.util.logging.Level; -@@ -27,6 +31,14 @@ public class FoldenorConfig { +@@ -25,6 +29,14 @@ public class FoldenorConfig { - public static boolean enableSuffocationOptimization = false; + public static boolean sendNullEntityPackets = false; + // Pufferfish DAB + public static boolean dearEnabled; @@ -41,9 +41,9 @@ index 8c8101d47376b9fb13652869401494c8b605620e..c36cac84603cd0c66c332eff8d55e16b public static void init(File configFile) { init(configFile, true); } -@@ -71,6 +83,12 @@ public class FoldenorConfig { - - readOptimizationSettings(); +@@ -67,6 +79,12 @@ public class FoldenorConfig { + static void readConfig() { + readNetworkSettings(); + try { + readDynamicActivationOfBrains(); @@ -54,8 +54,8 @@ index 8c8101d47376b9fb13652869401494c8b605620e..c36cac84603cd0c66c332eff8d55e16b try { config.save(CONFIG_FILE); } catch (IOException ex) { -@@ -90,6 +108,30 @@ public class FoldenorConfig { - "configuration option if the vanilla deviation is undesirable."); +@@ -78,6 +96,30 @@ public class FoldenorConfig { + sendNullEntityPackets = getBoolean("network.send-null-entity-packets", sendNullEntityPackets); } + private static void readDynamicActivationOfBrains() throws IOException { diff --git a/patches/server/0022-Leaves-Protocol-Core.patch b/patches/server/0021-Leaves-Protocol-Core.patch similarity index 100% rename from patches/server/0022-Leaves-Protocol-Core.patch rename to patches/server/0021-Leaves-Protocol-Core.patch diff --git a/patches/server/0023-Leaves-Appleskin-Protocol.patch b/patches/server/0022-Leaves-Appleskin-Protocol.patch similarity index 95% rename from patches/server/0023-Leaves-Appleskin-Protocol.patch rename to patches/server/0022-Leaves-Appleskin-Protocol.patch index 9637f57..f50dc2d 100644 --- a/patches/server/0023-Leaves-Appleskin-Protocol.patch +++ b/patches/server/0022-Leaves-Appleskin-Protocol.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Leaves-Appleskin-Protocol diff --git a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -index c36cac84603cd0c66c332eff8d55e16b7a5d3428..8e901c59e1310d70552b3853d3f5e721aad71a79 100644 +index 5b5a2491ec297c87458cf66171f5ed4c1e41e80d..36cf79632b12c67291ccccfda7341ee543e607c6 100644 --- a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java +++ b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -@@ -39,6 +39,8 @@ public class FoldenorConfig { +@@ -37,6 +37,8 @@ public class FoldenorConfig { public static int activationDistanceMod; // Pufferfish DAB @@ -17,14 +17,14 @@ index c36cac84603cd0c66c332eff8d55e16b7a5d3428..8e901c59e1310d70552b3853d3f5e721 public static void init(File configFile) { init(configFile, true); } -@@ -98,6 +100,7 @@ public class FoldenorConfig { +@@ -94,6 +96,7 @@ public class FoldenorConfig { protected static void readNetworkSettings(){ sendNullEntityPackets = getBoolean("network.send-null-entity-packets", sendNullEntityPackets); + appleskinProtocol = getBoolean("network.appleskin-protocol", appleskinProtocol); } - private static void readOptimizationSettings() { + private static void readDynamicActivationOfBrains() throws IOException { diff --git a/src/main/java/org/leavesmc/leaves/protocol/AppleSkinProtocol.java b/src/main/java/org/leavesmc/leaves/protocol/AppleSkinProtocol.java new file mode 100644 index 0000000000000000000000000000000000000000..a8694777f0619584c76c9cba47f7926435b768a9 diff --git a/patches/server/0024-Gale-Faster-chunk-serialization.patch b/patches/server/0023-Gale-Faster-chunk-serialization.patch similarity index 100% rename from patches/server/0024-Gale-Faster-chunk-serialization.patch rename to patches/server/0023-Gale-Faster-chunk-serialization.patch diff --git a/patches/server/0025-Gale-Skip-entity-move-if-movement-is-zero.patch b/patches/server/0024-Gale-Skip-entity-move-if-movement-is-zero.patch similarity index 100% rename from patches/server/0025-Gale-Skip-entity-move-if-movement-is-zero.patch rename to patches/server/0024-Gale-Skip-entity-move-if-movement-is-zero.patch diff --git a/patches/server/0026-Gale-Reduce-acquire-POI-for-stuck-entities.patch b/patches/server/0025-Gale-Reduce-acquire-POI-for-stuck-entities.patch similarity index 96% rename from patches/server/0026-Gale-Reduce-acquire-POI-for-stuck-entities.patch rename to patches/server/0025-Gale-Reduce-acquire-POI-for-stuck-entities.patch index c262fe7..50ec344 100644 --- a/patches/server/0026-Gale-Reduce-acquire-POI-for-stuck-entities.patch +++ b/patches/server/0025-Gale-Reduce-acquire-POI-for-stuck-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Gale-Reduce-acquire-POI-for-stuck-entities diff --git a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -index 8e901c59e1310d70552b3853d3f5e721aad71a79..f8618b1b7d3ecddd5ac9e1057167050a610f8e54 100644 +index 36cf79632b12c67291ccccfda7341ee543e607c6..3dfc4f1b7fd8b0c968ebfec11525a42588a168e2 100644 --- a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java +++ b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -@@ -41,6 +41,8 @@ public class FoldenorConfig { +@@ -39,6 +39,8 @@ public class FoldenorConfig { public static boolean appleskinProtocol = false; diff --git a/patches/server/0027-Gale-Optimize-sun-burn-tick.patch b/patches/server/0026-Gale-Optimize-sun-burn-tick.patch similarity index 100% rename from patches/server/0027-Gale-Optimize-sun-burn-tick.patch rename to patches/server/0026-Gale-Optimize-sun-burn-tick.patch diff --git a/patches/server/0028-Purpur-Alternative-Keepalive-Handling.patch b/patches/server/0027-Purpur-Alternative-Keepalive-Handling.patch similarity index 94% rename from patches/server/0028-Purpur-Alternative-Keepalive-Handling.patch rename to patches/server/0027-Purpur-Alternative-Keepalive-Handling.patch index 9a3d153..9549dfa 100644 --- a/patches/server/0028-Purpur-Alternative-Keepalive-Handling.patch +++ b/patches/server/0027-Purpur-Alternative-Keepalive-Handling.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Purpur-Alternative-Keepalive-Handling diff --git a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -index f8618b1b7d3ecddd5ac9e1057167050a610f8e54..b52f7bcc17fba6a3a4376a4bfea17430be9c4a8e 100644 +index 3dfc4f1b7fd8b0c968ebfec11525a42588a168e2..4c305c313db5223378eb5374c2163924edbb3b61 100644 --- a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java +++ b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -@@ -43,6 +43,8 @@ public class FoldenorConfig { +@@ -41,6 +41,8 @@ public class FoldenorConfig { public static int acquirePoiForStuckEntity = 60; @@ -17,14 +17,14 @@ index f8618b1b7d3ecddd5ac9e1057167050a610f8e54..b52f7bcc17fba6a3a4376a4bfea17430 public static void init(File configFile) { init(configFile, true); } -@@ -103,6 +105,7 @@ public class FoldenorConfig { +@@ -99,6 +101,7 @@ public class FoldenorConfig { protected static void readNetworkSettings(){ sendNullEntityPackets = getBoolean("network.send-null-entity-packets", sendNullEntityPackets); appleskinProtocol = getBoolean("network.appleskin-protocol", appleskinProtocol); + useAlternateKeepAlive = getBoolean("network.use-alternate-keepalive", useAlternateKeepAlive); } - private static void readOptimizationSettings() { + private static void readDynamicActivationOfBrains() throws IOException { diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java index 6531c3173f0fd54196c11db3e6348e0afe617376..d5bb4d2a23687fe0dfc6c6920fc90580a366019f 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java diff --git a/patches/server/0029-Purpur-Remove-timings.patch b/patches/server/0028-Purpur-Remove-timings.patch similarity index 99% rename from patches/server/0029-Purpur-Remove-timings.patch rename to patches/server/0028-Purpur-Remove-timings.patch index 4bef344..e5b98ce 100644 --- a/patches/server/0029-Purpur-Remove-timings.patch +++ b/patches/server/0028-Purpur-Remove-timings.patch @@ -1421,7 +1421,7 @@ index da815f30a44cbfe577b75b79e4527930fc6980d7..280b65d9ea6cde9f417057632c305645 return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS; } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 873e9b488a14866c99779a5b5e5f3d1c211febd6..bd2f3c8f28615b60a02ca09092e1429d5d4ae77c 100644 +index b4fec6374803534aa3b5d5e7aec64f68c7c7c356..33f6905706f333904ccd08f5f01ad6276b3fa24d 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -157,7 +157,6 @@ import org.bukkit.event.entity.EntityTeleportEvent; diff --git a/patches/server/0030-Add-chance-config-for-piglin-spawn-in-nether-portal.patch b/patches/server/0029-Add-chance-config-for-piglin-spawn-in-nether-portal.patch similarity index 78% rename from patches/server/0030-Add-chance-config-for-piglin-spawn-in-nether-portal.patch rename to patches/server/0029-Add-chance-config-for-piglin-spawn-in-nether-portal.patch index 9fe1998..ad67118 100644 --- a/patches/server/0030-Add-chance-config-for-piglin-spawn-in-nether-portal.patch +++ b/patches/server/0029-Add-chance-config-for-piglin-spawn-in-nether-portal.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add-chance-config-for-piglin-spawn-in-nether-portal diff --git a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -index b52f7bcc17fba6a3a4376a4bfea17430be9c4a8e..553c02a53b9aed6c851305f1e885934677fa5daa 100644 +index 4c305c313db5223378eb5374c2163924edbb3b61..01687fa24c649cfbec58fde93b5af3a32d8222c3 100644 --- a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java +++ b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -@@ -45,6 +45,8 @@ public class FoldenorConfig { +@@ -43,6 +43,8 @@ public class FoldenorConfig { public static boolean useAlternateKeepAlive = false; @@ -17,15 +17,27 @@ index b52f7bcc17fba6a3a4376a4bfea17430be9c4a8e..553c02a53b9aed6c851305f1e8859346 public static void init(File configFile) { init(configFile, true); } -@@ -114,6 +116,8 @@ public class FoldenorConfig { - "the check in a way that still appears vanilla. This should", - "be left enabled on most servers, but is provided as a", - "configuration option if the vanilla deviation is undesirable."); -+ piglinSpawnChancePersentInPortal = getInt("optimizations.piglin-spawn-chance-persent-in-portal", 100, -+ "Reduces piglin spawn in portal, by reducing change to spawn"); +@@ -85,6 +87,8 @@ public class FoldenorConfig { + static void readConfig() { + readNetworkSettings(); + ++ readOptimizationSettings(); ++ + try { + readDynamicActivationOfBrains(); + } catch (IOException e) { +@@ -104,6 +108,11 @@ public class FoldenorConfig { + useAlternateKeepAlive = getBoolean("network.use-alternate-keepalive", useAlternateKeepAlive); } ++ private static void readOptimizationSettings() { ++ piglinSpawnChancePersentInPortal = getInt("optimizations.piglin-spawn-chance-persent-in-portal", 100, ++ "Reduces piglin spawn in portal, by reducing change to spawn"); ++ } ++ private static void readDynamicActivationOfBrains() throws IOException { + dearEnabled = getBoolean("dab.enabled", true); + startDistance = getInt("dab.start-distance", 12, diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java index eba62f1336697157da94c7dcde389cc2e929bb0b..918b50e1f17fa2b49e5e7ef48182538ea12aae02 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java diff --git a/patches/server/0031-Leaf-Virtual-Thread-for-async-scheduler.patch b/patches/server/0030-Leaf-Virtual-Thread-for-async-scheduler.patch similarity index 94% rename from patches/server/0031-Leaf-Virtual-Thread-for-async-scheduler.patch rename to patches/server/0030-Leaf-Virtual-Thread-for-async-scheduler.patch index 5618945..4145781 100644 --- a/patches/server/0031-Leaf-Virtual-Thread-for-async-scheduler.patch +++ b/patches/server/0030-Leaf-Virtual-Thread-for-async-scheduler.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Leaf-Virtual-Thread-for-async-scheduler diff --git a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -index 553c02a53b9aed6c851305f1e885934677fa5daa..d2badf33e46350aec586342e4e97b65a748c353e 100644 +index 01687fa24c649cfbec58fde93b5af3a32d8222c3..4ac748456e7e243513c194c37c9c63d6a4757e78 100644 --- a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java +++ b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -@@ -47,6 +47,8 @@ public class FoldenorConfig { +@@ -45,6 +45,8 @@ public class FoldenorConfig { public static int piglinSpawnChancePersentInPortal = 100; @@ -17,7 +17,7 @@ index 553c02a53b9aed6c851305f1e885934677fa5daa..d2badf33e46350aec586342e4e97b65a public static void init(File configFile) { init(configFile, true); } -@@ -91,6 +93,8 @@ public class FoldenorConfig { +@@ -89,6 +91,8 @@ public class FoldenorConfig { readOptimizationSettings(); @@ -26,7 +26,7 @@ index 553c02a53b9aed6c851305f1e885934677fa5daa..d2badf33e46350aec586342e4e97b65a try { readDynamicActivationOfBrains(); } catch (IOException e) { -@@ -120,6 +124,11 @@ public class FoldenorConfig { +@@ -113,6 +117,11 @@ public class FoldenorConfig { "Reduces piglin spawn in portal, by reducing change to spawn"); } diff --git a/patches/server/0032-Carpet-Fixes-getBiome-Optimize.patch b/patches/server/0031-Carpet-Fixes-getBiome-Optimize.patch similarity index 100% rename from patches/server/0032-Carpet-Fixes-getBiome-Optimize.patch rename to patches/server/0031-Carpet-Fixes-getBiome-Optimize.patch diff --git a/patches/server/0033-Sparkly-Paper-Optimize-canSee-checks.patch b/patches/server/0032-Sparkly-Paper-Optimize-canSee-checks.patch similarity index 100% rename from patches/server/0033-Sparkly-Paper-Optimize-canSee-checks.patch rename to patches/server/0032-Sparkly-Paper-Optimize-canSee-checks.patch diff --git a/patches/server/0034-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch b/patches/server/0033-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch similarity index 90% rename from patches/server/0034-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch rename to patches/server/0033-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch index 19ec6de..e1dc8be 100644 --- a/patches/server/0034-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch +++ b/patches/server/0033-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch @@ -5,10 +5,10 @@ Subject: [PATCH] SparklyPaper Skip 'MapItem#update()' if the map does not have diff --git a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -index d2badf33e46350aec586342e4e97b65a748c353e..fbc0835c8e3cafc678275334a378369207c9a6b1 100644 +index 4ac748456e7e243513c194c37c9c63d6a4757e78..bf1d94e148b67084b4ea8208eb395e31231c472b 100644 --- a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java +++ b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -@@ -49,6 +49,8 @@ public class FoldenorConfig { +@@ -47,6 +47,8 @@ public class FoldenorConfig { public static boolean useVirtualThreadForAsyncScheduler = false; @@ -17,8 +17,8 @@ index d2badf33e46350aec586342e4e97b65a748c353e..fbc0835c8e3cafc678275334a3783692 public static void init(File configFile) { init(configFile, true); } -@@ -122,6 +124,7 @@ public class FoldenorConfig { - "configuration option if the vanilla deviation is undesirable."); +@@ -115,6 +117,7 @@ public class FoldenorConfig { + private static void readOptimizationSettings() { piglinSpawnChancePersentInPortal = getInt("optimizations.piglin-spawn-chance-persent-in-portal", 100, "Reduces piglin spawn in portal, by reducing change to spawn"); + skipMapItemUpdatesIfNoBukkitRender = getBoolean("optimizations.skip_map_item_updates_if_no_bukkit_render", skipMapItemUpdatesIfNoBukkitRender); diff --git a/patches/server/0035-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch b/patches/server/0034-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch similarity index 100% rename from patches/server/0035-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch rename to patches/server/0034-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch diff --git a/patches/server/0036-Leaf-Skip-event-if-no-listeners.patch b/patches/server/0035-Leaf-Skip-event-if-no-listeners.patch similarity index 100% rename from patches/server/0036-Leaf-Skip-event-if-no-listeners.patch rename to patches/server/0035-Leaf-Skip-event-if-no-listeners.patch diff --git a/patches/server/0037-Divine-lithium-ai.raid.patch b/patches/server/0036-Divine-lithium-ai.raid.patch similarity index 100% rename from patches/server/0037-Divine-lithium-ai.raid.patch rename to patches/server/0036-Divine-lithium-ai.raid.patch diff --git a/patches/server/0038-Divine-lithium-entity.fast_elytra_check-entity.fast_.patch b/patches/server/0037-Divine-lithium-entity.fast_elytra_check-entity.fast_.patch similarity index 82% rename from patches/server/0038-Divine-lithium-entity.fast_elytra_check-entity.fast_.patch rename to patches/server/0037-Divine-lithium-entity.fast_elytra_check-entity.fast_.patch index 1893b09..3b4835d 100644 --- a/patches/server/0038-Divine-lithium-entity.fast_elytra_check-entity.fast_.patch +++ b/patches/server/0037-Divine-lithium-entity.fast_elytra_check-entity.fast_.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Divine: lithium: entity.fast_elytra_check + diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index bd2f3c8f28615b60a02ca09092e1429d5d4ae77c..8dc1b4caac03d7bf09b2bd4cb6d2634699a23c47 100644 +index 33f6905706f333904ccd08f5f01ad6276b3fa24d..ac95df2d619ef79a2f07e0071523c05ea1a4d08b 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -2668,6 +2668,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2658,6 +2658,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } protected void updateSwingTime() { @@ -17,7 +17,7 @@ index bd2f3c8f28615b60a02ca09092e1429d5d4ae77c..8dc1b4caac03d7bf09b2bd4cb6d26346 int i = this.getCurrentSwingDuration(); if (this.swinging) { -@@ -3616,6 +3617,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3606,6 +3607,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } private void updateFallFlying() { diff --git a/patches/server/0039-Purpur-Fix-outdated-server-showing-in-ping-before-se.patch b/patches/server/0038-Purpur-Fix-outdated-server-showing-in-ping-before-se.patch similarity index 100% rename from patches/server/0039-Purpur-Fix-outdated-server-showing-in-ping-before-se.patch rename to patches/server/0038-Purpur-Fix-outdated-server-showing-in-ping-before-se.patch diff --git a/patches/server/0041-Add-linear-format-from-LinearPurpur.patch b/patches/server/0039-Add-linear-format-from-LinearPurpur.patch similarity index 99% rename from patches/server/0041-Add-linear-format-from-LinearPurpur.patch rename to patches/server/0039-Add-linear-format-from-LinearPurpur.patch index 9aaffcf..e3609d7 100644 --- a/patches/server/0041-Add-linear-format-from-LinearPurpur.patch +++ b/patches/server/0039-Add-linear-format-from-LinearPurpur.patch @@ -63,7 +63,7 @@ index 3218cbf84f54daf06e84442d5eb1a36d8da6b215..ec9b27177dc526510e86d85f48f167b4 synchronized (cache) { regionFile = ((ChunkSystemRegionFileStorage)(Object)cache).moonrise$getRegionFileIfLoaded(chunkX, chunkZ); diff --git a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -index 4801dc90dbb3863beda1f0b89e6d30b8c0d20b0d..89ba3bdd1aa5612fece2c8df807963fc056e2ee8 100644 +index bf1d94e148b67084b4ea8208eb395e31231c472b..4b7c163b91443fb1013c5233e85705a8e532ab38 100644 --- a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java +++ b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java @@ -2,6 +2,7 @@ package net.edenor.foldenor.config; @@ -96,9 +96,9 @@ index 4801dc90dbb3863beda1f0b89e6d30b8c0d20b0d..89ba3bdd1aa5612fece2c8df807963fc public static int version; static boolean verbose; -@@ -57,6 +62,12 @@ public class FoldenorConfig { - public static int villagerLobotomizeCheckInterval = 100; - // Purpur Villager lobotomize +@@ -49,6 +54,12 @@ public class FoldenorConfig { + + public static boolean skipMapItemUpdatesIfNoBukkitRender = true; + public static String regionFormatTypeName = "MCA"; + public static int linearCompressionLevel = 1; @@ -109,7 +109,7 @@ index 4801dc90dbb3863beda1f0b89e6d30b8c0d20b0d..89ba3bdd1aa5612fece2c8df807963fc public static void init(File configFile) { init(configFile, true); } -@@ -103,6 +114,8 @@ public class FoldenorConfig { +@@ -95,6 +106,8 @@ public class FoldenorConfig { readMiscSettings(); @@ -118,7 +118,7 @@ index 4801dc90dbb3863beda1f0b89e6d30b8c0d20b0d..89ba3bdd1aa5612fece2c8df807963fc try { readDynamicActivationOfBrains(); } catch (IOException e) { -@@ -142,6 +155,25 @@ public class FoldenorConfig { +@@ -125,6 +138,25 @@ public class FoldenorConfig { "Use the new Virtual Thread introduced in JDK 21 for CraftAsyncScheduler."); } diff --git a/patches/server/0042-Change-profiler-permission.patch b/patches/server/0040-Change-profiler-permission.patch similarity index 100% rename from patches/server/0042-Change-profiler-permission.patch rename to patches/server/0040-Change-profiler-permission.patch diff --git a/patches/server/0040-Purpur-Lobotomize-stuck-villagers.patch b/patches/server/0040-Purpur-Lobotomize-stuck-villagers.patch deleted file mode 100644 index 71f710b..0000000 --- a/patches/server/0040-Purpur-Lobotomize-stuck-villagers.patch +++ /dev/null @@ -1,223 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AltronMaxX -Date: Tue, 6 Aug 2024 19:52:02 +0400 -Subject: [PATCH] Purpur-Lobotomize-stuck-villagers - - -diff --git a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -index fbc0835c8e3cafc678275334a378369207c9a6b1..4801dc90dbb3863beda1f0b89e6d30b8c0d20b0d 100644 ---- a/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -+++ b/src/main/java/net/edenor/foldenor/config/FoldenorConfig.java -@@ -51,6 +51,12 @@ public class FoldenorConfig { - - public static boolean skipMapItemUpdatesIfNoBukkitRender = true; - -+ // Purpur Villager lobotomize -+ public static boolean villagerLobotomizeEnabled = false; -+ public static boolean villagerLobotomizeWaitUntilTradeLocked = false; -+ public static int villagerLobotomizeCheckInterval = 100; -+ // Purpur Villager lobotomize -+ - public static void init(File configFile) { - init(configFile, true); - } -@@ -125,6 +131,10 @@ public class FoldenorConfig { - piglinSpawnChancePersentInPortal = getInt("optimizations.piglin-spawn-chance-persent-in-portal", 100, - "Reduces piglin spawn in portal, by reducing change to spawn"); - skipMapItemUpdatesIfNoBukkitRender = getBoolean("optimizations.skip_map_item_updates_if_no_bukkit_render", skipMapItemUpdatesIfNoBukkitRender); -+ -+ villagerLobotomizeEnabled = getBoolean("optimizations.villager-lobotomize.enabled", villagerLobotomizeEnabled); -+ villagerLobotomizeWaitUntilTradeLocked = getBoolean("optimizations.villager-lobotomize.wait-until-trade-locked", villagerLobotomizeWaitUntilTradeLocked); -+ villagerLobotomizeCheckInterval = getInt("optimizations.villager-lobotomize.check-interval", villagerLobotomizeCheckInterval); - } - - private static void readMiscSettings() { -diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 3f4e4b612e127e51b240bca8776f6fc3743bd2d7..c3a470220b4be29896deb56c4eadd33395047507 100644 ---- a/src/main/java/net/minecraft/world/entity/npc/Villager.java -+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -18,6 +18,8 @@ import java.util.Set; - import java.util.function.BiPredicate; - import java.util.stream.Collectors; - import javax.annotation.Nullable; -+ -+import net.edenor.foldenor.config.FoldenorConfig; - import net.minecraft.core.BlockPos; - import net.minecraft.core.GlobalPos; - import net.minecraft.core.Holder; -@@ -143,6 +145,10 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - return holder.is(PoiTypes.MEETING); - }); - -+ private boolean isLobotomized = false; -+ public boolean isLobotomized() { return this.isLobotomized; } // Purpur -+ private int notLobotomizedCount = 0; // Purpur -+ - public long nextGolemPanic = -1; // Pufferfish - - public Villager(EntityType entityType, Level world) { -@@ -158,6 +164,48 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - this.setVillagerData(this.getVillagerData().setType(type).setProfession(VillagerProfession.NONE)); - } - -+ private boolean checkLobotomized() { -+ int interval = FoldenorConfig.villagerLobotomizeCheckInterval; -+ boolean shouldCheckForTradeLocked = FoldenorConfig.villagerLobotomizeWaitUntilTradeLocked; -+ if (this.notLobotomizedCount > 3) { -+ // check half as often if not lobotomized for the last 3+ consecutive checks -+ interval *= 2; -+ } -+ if (this.level().getGameTime() % interval == 0) { -+ // offset Y for short blocks like dirt_path/farmland -+ this.isLobotomized = !(shouldCheckForTradeLocked && this.getVillagerXp() == 0) && !canTravelFrom(BlockPos.containing(this.position().x, this.getBoundingBox().minY + 0.0625D, this.position().z)); -+ -+ if (this.isLobotomized) { -+ this.notLobotomizedCount = 0; -+ } else { -+ this.notLobotomizedCount++; -+ } -+ } -+ return this.isLobotomized; -+ } -+ -+ private boolean canTravelFrom(BlockPos pos) { -+ return canTravelTo(pos.east()) || canTravelTo(pos.west()) || canTravelTo(pos.north()) || canTravelTo(pos.south()); -+ } -+ -+ private boolean canTravelTo(BlockPos pos) { -+ net.minecraft.world.level.block.state.BlockState state = this.level().getBlockStateIfLoaded(pos); -+ if (state == null) { -+ // chunk not loaded -+ return false; -+ } -+ net.minecraft.world.level.block.Block bottom = state.getBlock(); -+ if (bottom instanceof net.minecraft.world.level.block.FenceBlock || -+ bottom instanceof net.minecraft.world.level.block.FenceGateBlock || -+ bottom instanceof net.minecraft.world.level.block.WallBlock) { -+ // bottom block is too tall to get over -+ return false; -+ } -+ net.minecraft.world.level.block.Block top = level().getBlockState(pos.above()).getBlock(); -+ // only if both blocks have no collision -+ return !bottom.hasCollision && !top.hasCollision; -+ } -+ - @Override - public Brain getBrain() { - return (Brain) super.getBrain(); // CraftBukkit - decompile error -@@ -255,13 +303,19 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - // Paper start - this.customServerAiStep(false); - } -- protected void customServerAiStep(final boolean inactive) { -+ protected void customServerAiStep(boolean inactive) { - // Paper end - this.level().getProfiler().push("villagerBrain"); - // Pufferfish start -+ if (FoldenorConfig.villagerLobotomizeEnabled) { -+ // treat as inactive if lobotomized -+ inactive = inactive || checkLobotomized(); -+ } else { -+ this.isLobotomized = false; -+ } - if (!inactive && this.behaviorTick++ % this.activatedPriority == 0) { - this.getBrain().tick((ServerLevel) this.level(), this); // Paper -- } -+ } else if (this.isLobotomized && shouldRestock()) restock(); - // Pufferfish end - this.level().getProfiler().pop(); - if (this.assignProfessionWhenSpawned) { -@@ -379,14 +433,9 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - - private void resetSpecialPrices() { - if (!this.level().isClientSide()) { -- Iterator iterator = this.getOffers().iterator(); -- -- while (iterator.hasNext()) { -- MerchantOffer merchantrecipe = (MerchantOffer) iterator.next(); -- -+ for (MerchantOffer merchantrecipe : this.getOffers()) { - merchantrecipe.resetSpecialPriceDiff(); - } -- - } - } - -@@ -402,11 +451,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - - public void restock() { - this.updateDemand(); -- Iterator iterator = this.getOffers().iterator(); -- -- while (iterator.hasNext()) { -- MerchantOffer merchantrecipe = (MerchantOffer) iterator.next(); -- -+ for (MerchantOffer merchantrecipe : this.getOffers()) { - // CraftBukkit start - VillagerReplenishTradeEvent event = new VillagerReplenishTradeEvent((org.bukkit.entity.Villager) this.getBukkitEntity(), merchantrecipe.asBukkit()); - Bukkit.getPluginManager().callEvent(event); -@@ -477,11 +522,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - int i = 2 - this.numberOfRestocksToday; - - if (i > 0) { -- Iterator iterator = this.getOffers().iterator(); -- -- while (iterator.hasNext()) { -- MerchantOffer merchantrecipe = (MerchantOffer) iterator.next(); -- -+ for (MerchantOffer merchantrecipe : this.getOffers()) { - // CraftBukkit start - VillagerReplenishTradeEvent event = new VillagerReplenishTradeEvent((org.bukkit.entity.Villager) this.getBukkitEntity(), merchantrecipe.asBukkit()); - Bukkit.getPluginManager().callEvent(event); -@@ -500,11 +541,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - } - - private void updateDemand() { -- Iterator iterator = this.getOffers().iterator(); -- -- while (iterator.hasNext()) { -- MerchantOffer merchantrecipe = (MerchantOffer) iterator.next(); -- -+ for (MerchantOffer merchantrecipe : this.getOffers()) { - merchantrecipe.updateDemand(); - } - -@@ -514,10 +551,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - int i = this.getPlayerReputation(player); - - if (i != 0) { -- Iterator iterator = this.getOffers().iterator(); -- -- while (iterator.hasNext()) { -- MerchantOffer merchantrecipe = (MerchantOffer) iterator.next(); -+ for (MerchantOffer merchantrecipe : this.getOffers()) { - if (merchantrecipe.ignoreDiscounts) continue; // Paper - Add ignore discounts API - - merchantrecipe.addToSpecialPriceDiff(-Mth.floor((float) i * merchantrecipe.getPriceMultiplier())); -@@ -527,10 +561,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - if (player.hasEffect(MobEffects.HERO_OF_THE_VILLAGE)) { - MobEffectInstance mobeffect = player.getEffect(MobEffects.HERO_OF_THE_VILLAGE); - int j = mobeffect.getAmplifier(); -- Iterator iterator1 = this.getOffers().iterator(); -- -- while (iterator1.hasNext()) { -- MerchantOffer merchantrecipe1 = (MerchantOffer) iterator1.next(); -+ for (MerchantOffer merchantrecipe1 : this.getOffers()) { - if (merchantrecipe1.ignoreDiscounts) continue; // Paper - Add ignore discounts API - double d0 = 0.3D + 0.0625D * (double) j; - int k = (int) Math.floor(d0 * (double) merchantrecipe1.getBaseCostA().getCount()); -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java -index 46c4a33c4cb82049aa60fc7fc47707dcbd8c733e..186fea0b916103e4f5220be7e3a05ac0a82e6b52 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java -@@ -382,4 +382,10 @@ public class CraftVillager extends CraftAbstractVillager implements Villager { - getHandle().getGossips().gossips.clear(); - } - // Paper end -+ -+ // Purpur start -+ public boolean isLobotomized() { -+ return getHandle().isLobotomized(); -+ } -+ // Purpur end - }