mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-19 15:09:15 +00:00
添加overlay选项
This commit is contained in:
@@ -146,11 +146,14 @@ resource-pack:
|
||||
obfuscation:
|
||||
enable: false
|
||||
seed: 0 # 0 = random seed
|
||||
# Determines the number and length of obfuscated namespaces.
|
||||
# Determines the length of obfuscated overlay directories
|
||||
overlay:
|
||||
length: 4 # 0 = disable
|
||||
# Determines the number and length of obfuscated namespaces
|
||||
namespace:
|
||||
amount: 32 # 0 = disable
|
||||
length: 2
|
||||
# Determines the depth of the obfuscated path.
|
||||
# Determines the depth and length of the obfuscated path
|
||||
path:
|
||||
depth: 4
|
||||
length: 2
|
||||
|
||||
@@ -90,6 +90,7 @@ public class Config {
|
||||
protected boolean resource_pack$protection$obfuscation$path$anti_unzip;
|
||||
protected boolean resource_pack$protection$incorrect_crc;
|
||||
protected boolean resource_pack$protection$fake_file_size;
|
||||
protected NumberProvider resource_pack$protection$obfuscation$overlay$length;
|
||||
protected NumberProvider resource_pack$protection$obfuscation$namespace$length;
|
||||
protected int resource_pack$protection$obfuscation$namespace$amount;
|
||||
protected String resource_pack$protection$obfuscation$path$block_source;
|
||||
@@ -368,6 +369,7 @@ public class Config {
|
||||
resource_pack$protection$fake_file_size = config.getBoolean("resource-pack.protection.fake-file-size", false);
|
||||
resource_pack$protection$obfuscation$namespace$amount = config.getInt("resource-pack.protection.obfuscation.namespace.amount", 32);
|
||||
resource_pack$protection$obfuscation$namespace$length = NumberProviders.fromObject(config.get("resource-pack.protection.obfuscation.namespace.length", 2));
|
||||
resource_pack$protection$obfuscation$overlay$length = NumberProviders.fromObject(config.get("resource-pack.protection.obfuscation.overlay.length", 4));
|
||||
resource_pack$protection$obfuscation$path$depth = NumberProviders.fromObject(config.get("resource-pack.protection.obfuscation.path.depth", 4));
|
||||
resource_pack$protection$obfuscation$path$length = NumberProviders.fromObject(config.get("resource-pack.protection.obfuscation.path.length", 2));
|
||||
resource_pack$protection$obfuscation$path$block_source = config.getString("resource-pack.protection.obfuscation.path.block-source", "obf_block");
|
||||
@@ -890,6 +892,10 @@ public class Config {
|
||||
return instance.resource_pack$protection$obfuscation$path$length;
|
||||
}
|
||||
|
||||
public static NumberProvider overlayLength() {
|
||||
return instance.resource_pack$protection$obfuscation$overlay$length;
|
||||
}
|
||||
|
||||
public static boolean antiUnzip() {
|
||||
return instance.resource_pack$protection$obfuscation$path$anti_unzip;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user