From 4cae71a67ff3dcaad1a1dca61eb75a9e09484388 Mon Sep 17 00:00:00 2001 From: jhqwqmc <2110242767@qq.com> Date: Sat, 15 Mar 2025 12:26:31 +0800 Subject: [PATCH] =?UTF-8?q?optimize(core):=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bukkit-loader/src/main/resources/config.yml | 1 + .../resources/resources/default/configuration/items.yml | 4 ++-- .../craftengine/core/plugin/config/ConfigManager.java | 7 +++++++ gradle.properties | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bukkit-loader/src/main/resources/config.yml b/bukkit-loader/src/main/resources/config.yml index 1a27a1433..52854a150 100644 --- a/bukkit-loader/src/main/resources/config.yml +++ b/bukkit-loader/src/main/resources/config.yml @@ -46,6 +46,7 @@ resource-pack: - minecraft:block/farmland bypass-models: [] bypass-sounds: [] + bypass-equipments: [] supported-version: min: "1.20" diff --git a/bukkit-loader/src/main/resources/resources/default/configuration/items.yml b/bukkit-loader/src/main/resources/resources/default/configuration/items.yml index 112b7287e..4691912e2 100644 --- a/bukkit-loader/src/main/resources/resources/default/configuration/items.yml +++ b/bukkit-loader/src/main/resources/resources/default/configuration/items.yml @@ -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: diff --git a/core/src/main/java/net/momirealms/craftengine/core/plugin/config/ConfigManager.java b/core/src/main/java/net/momirealms/craftengine/core/plugin/config/ConfigManager.java index 8a51fa3f2..9490ece90 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/plugin/config/ConfigManager.java +++ b/core/src/main/java/net/momirealms/craftengine/core/plugin/config/ConfigManager.java @@ -65,6 +65,8 @@ public class ConfigManager implements Reloadable { protected List resource_pack$protection$obfuscation$resource_location$bypass_textures; protected List resource_pack$protection$obfuscation$resource_location$bypass_models; protected List resource_pack$protection$obfuscation$resource_location$bypass_sounds; + protected List 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 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()) { diff --git a/gradle.properties b/gradle.properties index 31ce1b8d4..11c081e51 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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