mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Hide seed obfuscation key from spark
This commit is contained in:
@@ -7,6 +7,7 @@ import net.minecraft.Util;
|
|||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.dreeam.leaf.config.modules.misc.SentryDSN;
|
import org.dreeam.leaf.config.modules.misc.SentryDSN;
|
||||||
|
import org.dreeam.leaf.config.modules.opt.FastBiomeManagerSeedObfuscation;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@@ -243,6 +244,7 @@ public class LeafConfig {
|
|||||||
|
|
||||||
List<String> extraHidden = existing != null ? new ArrayList<>(Arrays.asList(existing.split(","))) : new ArrayList<>();
|
List<String> extraHidden = existing != null ? new ArrayList<>(Arrays.asList(existing.split(","))) : new ArrayList<>();
|
||||||
extraHidden.add(SentryDSN.sentryDsnConfigPath); // Hide Sentry DSN key
|
extraHidden.add(SentryDSN.sentryDsnConfigPath); // Hide Sentry DSN key
|
||||||
|
extraHidden.add(FastBiomeManagerSeedObfuscation.seedObfKeyPath); // Hide FastBiomeManagerSeedObfuscation key
|
||||||
|
|
||||||
return extraHidden;
|
return extraHidden;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public class FastBiomeManagerSeedObfuscation extends ConfigModules {
|
|||||||
@Experimental
|
@Experimental
|
||||||
public static boolean enabled = false;
|
public static boolean enabled = false;
|
||||||
public static long seedObfuscationKey = ThreadLocalRandom.current().nextLong();
|
public static long seedObfuscationKey = ThreadLocalRandom.current().nextLong();
|
||||||
|
public static String seedObfKeyPath;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoaded() {
|
public void onLoaded() {
|
||||||
@@ -26,7 +27,7 @@ public class FastBiomeManagerSeedObfuscation extends ConfigModules {
|
|||||||
"""
|
"""
|
||||||
**实验性功能**
|
**实验性功能**
|
||||||
将原版 BiomeManager 的 SHA-256 种子混淆换成 XXHash."""));
|
将原版 BiomeManager 的 SHA-256 种子混淆换成 XXHash."""));
|
||||||
seedObfuscationKey = config.getLong(getBasePath() + ".seed-obfuscation-key", seedObfuscationKey,
|
seedObfuscationKey = config.getLong(seedObfKeyPath = getBasePath() + ".seed-obfuscation-key", seedObfuscationKey,
|
||||||
config.pickStringRegionBased(
|
config.pickStringRegionBased(
|
||||||
"Seed obfuscation key for XXHash.",
|
"Seed obfuscation key for XXHash.",
|
||||||
"XXHash 的混淆种子."));
|
"XXHash 的混淆种子."));
|
||||||
|
|||||||
Reference in New Issue
Block a user