mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-04 15:41:40 +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:
@@ -68,10 +68,10 @@ index c6efe6faf68c7a7b1df344e2e527aa7e44bfacb8..fe89e7b7c4267ee2969d1505f83cba1a
|
||||
public static enum Algorithm {
|
||||
diff --git a/src/main/java/org/dreeam/leaf/config/modules/opt/FastRNG.java b/src/main/java/org/dreeam/leaf/config/modules/opt/FastRNG.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4e980c7a90cb6f9ccd43ec1498dea90940208afd
|
||||
index 0000000000000000000000000000000000000000..1c90bcfef92a383ee16f551c5a5bff3e9d013e7f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/dreeam/leaf/config/modules/opt/FastRNG.java
|
||||
@@ -0,0 +1,40 @@
|
||||
@@ -0,0 +1,49 @@
|
||||
+package org.dreeam.leaf.config.modules.opt;
|
||||
+
|
||||
+import org.dreeam.leaf.config.ConfigModules;
|
||||
@@ -90,17 +90,26 @@ index 0000000000000000000000000000000000000000..4e980c7a90cb6f9ccd43ec1498dea909
|
||||
+
|
||||
+ @Override
|
||||
+ public void onLoaded() {
|
||||
+ config.addComment(getBasePath(), """
|
||||
+ config.addCommentRegionBased(getBasePath(), """
|
||||
+ Use faster random generator? (Up to 100X faster)
|
||||
+ Requires a JVM that supports RandomGenerator and the LXM generators.
|
||||
+ Some JREs don't support this and will cause a crash.""");
|
||||
+ Some JREs don't support this and will cause a crash.""",
|
||||
+ """
|
||||
+ 是否使用更快的随机生成器? (速度最高可提升至100倍)
|
||||
+ 需要支持 RandomGenerator 和 LXM 随机生成器的JVM.
|
||||
+ 一些 JRE 不支持此功能, 会导致崩溃.""");
|
||||
+
|
||||
+ enabled = config.getBoolean(getBasePath() + ".enabled", enabled);
|
||||
+ warnForSlimeChunk = config.getBoolean(getBasePath() + ".warn-for-slime-chunk", warnForSlimeChunk,
|
||||
+ "Warn if you are not using legacy random source for slime chunk generation.");
|
||||
+ useLegacyForSlimeChunk = config.getBoolean(getBasePath() + ".use-legacy-random-for-slime-chunk", useLegacyForSlimeChunk, """
|
||||
+ config.pickStringRegionBased(
|
||||
+ "Warn if you are not using legacy random source for slime chunk generation.",
|
||||
+ "是否在没有为史莱姆区块使用原版随机生成器的情况下进行警告."));
|
||||
+ useLegacyForSlimeChunk = config.getBoolean(getBasePath() + ".use-legacy-random-for-slime-chunk", useLegacyForSlimeChunk, config.pickStringRegionBased(
|
||||
+ """
|
||||
+ Use legacy random source for slime chunk generation,
|
||||
+ to follow vanilla behavior.""");
|
||||
+ to follow vanilla behavior.""",
|
||||
+ """
|
||||
+ 是否使用原版随机生成器来生成史莱姆区块."""));
|
||||
+
|
||||
+ if (enabled && warnForSlimeChunk) {
|
||||
+ LeafConfig.LOGGER.warn("You enabled faster random generator, it will offset location of slime chunk");
|
||||
|
||||
Reference in New Issue
Block a user