9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-20 07:29:17 +00:00

Merge pull request #47 from jhqwqmc/dev

feat(core): 优化代码
This commit is contained in:
XiaoMoMi
2025-03-19 23:50:54 +08:00
committed by GitHub
3 changed files with 9 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ resource-pack:
seed: 0 # 0 = random seed seed: 0 # 0 = random seed
fake-directory: true fake-directory: true
escape-unicode: true escape-unicode: true
break-json: true
resource-location: resource-location:
enable: true enable: true
random-namespace: random-namespace:

View File

@@ -54,6 +54,7 @@ public class ConfigManager implements Reloadable {
protected long resource_pack$protection$obfuscation$seed; protected long resource_pack$protection$obfuscation$seed;
protected boolean resource_pack$protection$obfuscation$fake_directory; protected boolean resource_pack$protection$obfuscation$fake_directory;
protected boolean resource_pack$protection$obfuscation$escape_unicode; protected boolean resource_pack$protection$obfuscation$escape_unicode;
protected boolean resource_pack$protection$obfuscation$break_json;
protected boolean resource_pack$protection$obfuscation$resource_location$enable; protected boolean resource_pack$protection$obfuscation$resource_location$enable;
protected int resource_pack$protection$obfuscation$resource_location$random_namespace$length; protected int resource_pack$protection$obfuscation$resource_location$random_namespace$length;
protected int resource_pack$protection$obfuscation$resource_location$random_namespace$amount; protected int resource_pack$protection$obfuscation$resource_location$random_namespace$amount;
@@ -200,6 +201,7 @@ public class ConfigManager implements Reloadable {
resource_pack$protection$obfuscation$seed = config.getLong("resource-pack.protection.obfuscation.seed", 0L); resource_pack$protection$obfuscation$seed = config.getLong("resource-pack.protection.obfuscation.seed", 0L);
resource_pack$protection$obfuscation$fake_directory = config.getBoolean("resource-pack.protection.obfuscation.fake-directory", false); resource_pack$protection$obfuscation$fake_directory = config.getBoolean("resource-pack.protection.obfuscation.fake-directory", false);
resource_pack$protection$obfuscation$escape_unicode = config.getBoolean("resource-pack.protection.obfuscation.escape-unicode", false); resource_pack$protection$obfuscation$escape_unicode = config.getBoolean("resource-pack.protection.obfuscation.escape-unicode", false);
resource_pack$protection$obfuscation$break_json = config.getBoolean("resource-pack.protection.obfuscation.break-json", false);
resource_pack$protection$obfuscation$resource_location$enable = config.getBoolean("resource-pack.protection.obfuscation.resource-location.enable", false); resource_pack$protection$obfuscation$resource_location$enable = config.getBoolean("resource-pack.protection.obfuscation.resource-location.enable", false);
resource_pack$protection$obfuscation$resource_location$random_namespace$amount = config.getInt("resource-pack.protection.obfuscation.resource-location.random-namespace.amount", 32); resource_pack$protection$obfuscation$resource_location$random_namespace$amount = config.getInt("resource-pack.protection.obfuscation.resource-location.random-namespace.amount", 32);
@@ -435,6 +437,10 @@ public class ConfigManager implements Reloadable {
return instance.resource_pack$protection$obfuscation$escape_unicode; return instance.resource_pack$protection$obfuscation$escape_unicode;
} }
public static boolean breakJson() {
return instance.resource_pack$protection$obfuscation$break_json;
}
public static boolean enableRandomResourceLocation() { public static boolean enableRandomResourceLocation() {
return instance.resource_pack$protection$obfuscation$resource_location$enable; return instance.resource_pack$protection$obfuscation$resource_location$enable;
} }

View File

@@ -1,7 +1,7 @@
# Project settings # Project settings
# Rule: [major update].[feature update].[bug fix] # Rule: [major update].[feature update].[bug fix]
project_version=0.0.35 project_version=0.0.36
config_version=14 config_version=15
lang_version=3 lang_version=3
project_group=net.momirealms project_group=net.momirealms
latest_minecraft_version=1.21.4 latest_minecraft_version=1.21.4