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

optimize(core): 优化代码

This commit is contained in:
jhqwqmc
2025-03-15 12:26:31 +08:00
parent 6967ea4399
commit 4cae71a67f
4 changed files with 11 additions and 3 deletions

View File

@@ -46,6 +46,7 @@ resource-pack:
- minecraft:block/farmland
bypass-models: []
bypass-sounds: []
bypass-equipments: []
supported-version:
min: "1.20"

View File

@@ -164,8 +164,8 @@ templates:
equippable:
slot: "{slot}"
asset-id: topaz
humanoid: "minecraft:entity/equipment/humanoid/topaz"
humanoid-leggings: "minecraft:entity/equipment/humanoid_leggings/topaz"
humanoid: "minecraft:topaz"
humanoid-leggings: "minecraft:topaz"
recipes:
default:topaz_shovel:

View File

@@ -65,6 +65,8 @@ public class ConfigManager implements Reloadable {
protected List<String> resource_pack$protection$obfuscation$resource_location$bypass_textures;
protected List<String> resource_pack$protection$obfuscation$resource_location$bypass_models;
protected List<String> resource_pack$protection$obfuscation$resource_location$bypass_sounds;
protected List<String> resource_pack$protection$obfuscation$resource_location$bypass_equipments;
protected float resource_pack$supported_version$min;
protected float resource_pack$supported_version$max;
@@ -210,6 +212,7 @@ public class ConfigManager implements Reloadable {
resource_pack$protection$obfuscation$resource_location$bypass_textures = config.getStringList("resource-pack.protection.obfuscation.resource-location.bypass-textures");
resource_pack$protection$obfuscation$resource_location$bypass_models = config.getStringList("resource-pack.protection.obfuscation.resource-location.bypass-models");
resource_pack$protection$obfuscation$resource_location$bypass_sounds = config.getStringList("resource-pack.protection.obfuscation.resource-location.bypass-sounds");
resource_pack$protection$obfuscation$resource_location$bypass_equipments = config.getStringList("resource-pack.protection.obfuscation.resource-location.bypass-equipments");
try {
resource_pack$duplicated_files_handler = config.getMapList("resource-pack.duplicated-files-handler").stream().map(it -> {
@@ -476,6 +479,10 @@ public class ConfigManager implements Reloadable {
return instance.resource_pack$protection$obfuscation$resource_location$bypass_sounds;
}
public static List<String> bypassEquipments() {
return instance.resource_pack$protection$obfuscation$resource_location$bypass_equipments;
}
public YamlDocument loadOrCreateYamlData(String fileName) {
File file = new File(this.plugin.dataFolderFile(), fileName);
if (!file.exists()) {

View File

@@ -1,7 +1,7 @@
# Project settings
# Rule: [major update].[feature update].[bug fix]
project_version=0.0.32
config_version=12
config_version=13
lang_version=2
project_group=net.momirealms
legacy_model_templates_version=1.21.3