9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-31 12:56:29 +00:00

Added region based comment (#165)

* Region based comment helper functions

* (Region based comment) Dont save entity

* (Region based comment) Pufferfish DAB

* (Region based comment) Cache EntityType

* (Region based comment) Cache EntityType

* (Region based comment) Pufferfish EntityTTL

* (Region based comment) Faster sequence

* (Region based comment) FastRNG

* (Region based comment) 0042

* (Region based comment) 0721

* (Region based comment) 0009

* (Region based comment) V1rtUal tHReaD

* (Region based comment) ZSSM

* [ci skip] (Region based comment) 0079

* [ci skip] (Region based comment) 0089 0090

* [ci skip] (Region based comment) 0049 0118 0138

* [ci skip] (Region based comment) 0006 0017 0018 0080 0081

* [ci skip] (Region based comment) 0019 0038 0059 0108 0117 0127

* ALL PATCHES ARE DONE

* [ci skip] NZDD
This commit is contained in:
Kobe ⑧
2024-11-14 19:40:57 +08:00
committed by GitHub
parent 7eaacd480e
commit fa9c4a78a7
35 changed files with 328 additions and 171 deletions

View File

@@ -556,10 +556,10 @@ index 0000000000000000000000000000000000000000..1ecaa9f4b4843c05af2139ae3e4b0dd0
+}
diff --git a/src/main/java/org/dreeam/leaf/config/modules/async/MultithreadedTracker.java b/src/main/java/org/dreeam/leaf/config/modules/async/MultithreadedTracker.java
new file mode 100644
index 0000000000000000000000000000000000000000..83e549e990664b87a279cb795e3f4b4b2768ca68
index 0000000000000000000000000000000000000000..bf253dbdcff603a4ebce181bf75131dd8aa52721
--- /dev/null
+++ b/src/main/java/org/dreeam/leaf/config/modules/async/MultithreadedTracker.java
@@ -0,0 +1,43 @@
@@ -0,0 +1,48 @@
+package org.dreeam.leaf.config.modules.async;
+
+import org.dreeam.leaf.config.ConfigModules;
@@ -579,16 +579,21 @@ index 0000000000000000000000000000000000000000..83e549e990664b87a279cb795e3f4b4b
+
+ @Override
+ public void onLoaded() {
+ config.addComment(getBasePath(), """
+ config.addCommentRegionBased(getBasePath(), """
+ Make entity tracking saving asynchronously, can improve performance significantly,
+ especially in some massive entities in small area situations.
+ """);
+ especially in some massive entities in small area situations.""",
+ """
+ 异步实体跟踪,
+ 在实体数量多且密集的情况下效果明显.""");
+
+ enabled = config().getBoolean(getBasePath() + ".enabled", enabled);
+ compatModeEnabled = config.getBoolean(getBasePath() + ".compat-mode", compatModeEnabled, """
+ compatModeEnabled = config.getBoolean(getBasePath() + ".compat-mode", compatModeEnabled, config.pickStringRegionBased("""
+ Enable compat mode ONLY if Citizens or NPC plugins using real entity has installed,
+ Compat mode fixed visible issue with player type NPCs of Citizens,
+ But still recommend to use packet based / virtual entity NPC plugin, e.g. ZNPC Plus, Adyeshach, Fancy NPC or else.""");
+ But still recommend to use packet based / virtual entity NPC plugin, e.g. ZNPC Plus, Adyeshach, Fancy NPC or else.""",
+ """
+ 是否启用兼容模式,
+ 如果你的服务器安装了 Citizens 或其他类似非发包 NPC 插件, 请开启此项."""));
+ asyncEntityTrackerMaxThreads = config.getInt(getBasePath() + ".max-threads", asyncEntityTrackerMaxThreads);
+ asyncEntityTrackerKeepalive = config.getInt(getBasePath() + ".keepalive", asyncEntityTrackerKeepalive);
+