diff --git a/README.md b/README.md
index f0b0d8a09..fefff6da4 100644
--- a/README.md
+++ b/README.md
@@ -148,7 +148,7 @@ repositories {
```
```kotlin
dependencies {
- compileOnly("net.momirealms:craft-engine-core:0.0.49")
- compileOnly("net.momirealms:craft-engine-bukkit:0.0.49")
+ compileOnly("net.momirealms:craft-engine-core:0.0.52")
+ compileOnly("net.momirealms:craft-engine-bukkit:0.0.52")
}
```
\ No newline at end of file
diff --git a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/skript/event/EvtCustomClick.java b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/skript/event/EvtCustomClick.java
index 68bcdb48b..8c37c2a04 100644
--- a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/skript/event/EvtCustomClick.java
+++ b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/skript/event/EvtCustomClick.java
@@ -22,6 +22,7 @@ public class EvtCustomClick extends SkriptEvent {
private final static int RIGHT = 1, LEFT = 2, ANY = RIGHT | LEFT;
public final static ClickEventTracker interactTracker = new ClickEventTracker(Skript.getInstance());
+ @SuppressWarnings("unchecked")
public static void register() {
Skript.registerEvent("Interact Custom Block Furniture", EvtCustomClick.class, new Class[]{CustomBlockInteractEvent.class, FurnitureInteractEvent.class},
"[(" + RIGHT + ":right|" + LEFT + ":left)(| |-)][mouse(| |-)]click[ing] [on %-unsafeblockstatematchers/strings%] [(with|using|holding) %-itemtype%]",
diff --git a/bukkit/loader/src/main/resources/config.yml b/bukkit/loader/src/main/resources/config.yml
index eda56d932..da8cf0aa0 100644
--- a/bukkit/loader/src/main/resources/config.yml
+++ b/bukkit/loader/src/main/resources/config.yml
@@ -351,6 +351,8 @@ chunk-system:
# 4 = LZ4 | Blazing-Fast Blazing-Fast Low Low |
# 5 = ZSTD | Medium-Fast Fast High Medium |
compression-method: 4
+ # This might not work for some server forks that modify how Minecraft saves chunks.
+ fast-palette-injection: false
# Auto-convert custom blocks -> vanilla blocks when unloading chunks
#
# - When ENABLED (true):
diff --git a/bukkit/loader/src/main/resources/resources/default/configuration/templates.yml b/bukkit/loader/src/main/resources/resources/default/configuration/templates.yml
index 4476e5c87..b2f321624 100644
--- a/bukkit/loader/src/main/resources/resources/default/configuration/templates.yml
+++ b/bukkit/loader/src/main/resources/resources/default/configuration/templates.yml
@@ -314,7 +314,7 @@ templates#models#crossbow:
threshold: 0.58
- model:
type: minecraft:model
- path: "{pulling_2_path}"
+ path: "{pulling_2_model}"
threshold: 1.0
fallback:
type: minecraft:model
diff --git a/bukkit/loader/src/main/resources/translations/en.yml b/bukkit/loader/src/main/resources/translations/en.yml
index 6ac0e36c9..7b9afee86 100644
--- a/bukkit/loader/src/main/resources/translations/en.yml
+++ b/bukkit/loader/src/main/resources/translations/en.yml
@@ -1,6 +1,7 @@
# Don't change this
lang-version: "${lang_version}"
+# Commands
exception.invalid_syntax: "Invalid syntax. Correct syntax: "
exception.invalid_argument: "Invalid argument. Reason: "
exception.invalid_sender: " is not allowed to execute that command. Must be of type "
@@ -63,79 +64,213 @@ command.upload.failure.not_supported: "Current hosting method '' doe
command.upload.on_progress: "Started uploading progress. Check the console for more information."
command.send_resource_pack.success.single: "Sent resource pack to ."
command.send_resource_pack.success.multiple: "Send resource packs to players."
-warning.config.image.duplicated: "Issue found in file - Duplicated image ''."
-warning.config.image.lack_height: "Issue found in file - The image '' is missing the required 'height' argument."
-warning.config.image.height_smaller_than_ascent: "Issue found in file - The image '' violates the bitmap image rule: 'height' should be no lower than 'ascent'."
-warning.config.image.no_file: "Issue found in file - The image '' is missing the required 'file' argument."
-warning.config.image.invalid_resource_location: "Issue found in file - The image '' has a 'file' argument [] that contains legal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters"
-warning.config.image.invalid_font_name: "Issue found in file - The image '' has a 'font' argument [] that contains legal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters"
-warning.config.image.lack_char: "Issue found in file - The image '' is missing the required 'char' argument."
-warning.config.image.codepoint_in_use: "Issue found in file - The image '' is using a character[()] in font that has been used by another image ''."
-warning.config.image.invalid_codepoint_grid: "Issue found in file - Image '' has an invalid 'chars' codepoint grind."
-warning.config.image.file_not_exist: "Issue found in file - PNG file '' not found for image ''."
-warning.config.recipe.duplicated: "Issue found in file - Duplicated recipe ''."
+warning.config.pack.duplicated_files: "Duplicated files Found. Please resolve them through config.yml 'resource-pack.duplicated-files-handler' section."
+warning.config.type.int: "Issue found in file - Failed to load '': Cannot cast '' to integer type for option ''."
+warning.config.type.float: "Issue found in file - Failed to load '': Cannot cast '' to float type for option ''."
+warning.config.type.double: "Issue found in file - Failed to load '': Cannot cast '' to double type for option ''."
+warning.config.type.quaternionf: "Issue found in file - Failed to load '': Cannot cast '' to Quaternionf type for option ''."
+warning.config.type.vector3f: "Issue found in file - Failed to load '': Cannot cast '' to Vector3f type for option ''."
+warning.config.structure.not_section: "Issue found in file - The config '' is expected to be a config section while it's actually a(n) ''."
+warning.config.image.duplicate: "Issue found in file - Duplicated image ''. Please check if there is the same configuration in other files."
+warning.config.image.missing_height: "Issue found in file - The image '' is missing the required 'height' argument."
+warning.config.image.height_ascent_conflict: "Issue found in file - The image '' violates the bitmap image rule: 'height' argument '' should be no lower than 'ascent' argument ''."
+warning.config.image.missing_file: "Issue found in file - The image '' is missing the required 'file' argument."
+warning.config.image.invalid_file_chars: "Issue found in file - The image '' has a 'file' argument '' that contains illegal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters."
+warning.config.image.invalid_font_chars: "Issue found in file - The image '' has a 'font' argument '' that contains illegal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters."
+warning.config.image.missing_char: "Issue found in file - The image '' is missing the required 'char' argument."
+warning.config.image.codepoint_conflict: "Issue found in file - The image '' is using a character '()' in font that has been used by another image ''."
+warning.config.image.invalid_codepoint_grid: "Issue found in file - Image '' has an invalid 'chars' codepoint grid."
+warning.config.image.file_not_found: "Issue found in file - PNG file '' not found for image ''."
+warning.config.image.invalid_hex_value: "Issue found in file - The image '' is using a unicode character '' that is not a valid hexadecimal (radix 16) value."
+warning.config.recipe.duplicate: "Issue found in file - Duplicated recipe ''. Please check if there is the same configuration in other files."
+warning.config.recipe.missing_type: "Issue found in file - The recipe '' is missing the required 'type' argument."
+warning.config.recipe.invalid_type: "Issue found in file - The recipe '' is using an invalid recipe type ''."
+warning.config.recipe.invalid_item: "Issue found in file - The recipe '' is using an invalid item ''."
+warning.config.recipe.missing_ingredient: "Issue found in file - The cooking recipe '' is missing the required 'ingredient' argument."
+warning.config.recipe.missing_result: "Issue found in file - The recipe '' is missing the required 'result' argument."
+warning.config.recipe.result.missing_id: "Issue found in file - The recipe '' is missing the required argument 'id' for recipe result."
+warning.config.recipe.crafting.invalid_category: "Issue found in file - The crafting recipe '' is using an invalid category ''. Allowed categories: []."
+warning.config.recipe.cooking.invalid_category: "Issue found in file - The cooking recipe '' is using an invalid category ''. Allowed categories: []."
+warning.config.recipe.shaped.missing_pattern: "Issue found in file - The shaped recipe '' is missing the required argument 'pattern'."
+warning.config.recipe.shaped.invalid_pattern: "Issue found in file - The shaped recipe '' is using an invalid pattern ''."
+warning.config.recipe.shaped.invalid_symbol: "Issue found in file - The shaped recipe '' is using an invalid symbol '' in pattern."
+warning.config.recipe.smithing_transform.post_processor.missing_type: "Issue found in file - The smithing transform recipe '' is missing the required argument 'type' for one of the post-processors."
+warning.config.recipe.smithing_transform.post_processor.invalid_type: "Issue found in file - The smithing transform recipe '' is using an invalid post processor type ''."
+warning.config.recipe.smithing_transform.post_processor.keep_component.missing_components: "Issue found in file - The smithing transform recipe '' is missing the required argument 'components' for post-processors 'keep_components'."
+warning.config.recipe.smithing_transform.post_processor.keep_component.missing_tags: "Issue found in file - The smithing transform recipe '' is missing the required argument 'tags' for post-processors 'keep_tags'."
warning.config.i18n.unknown_locale: "Issue found in file - Unknown locale ''."
-warning.config.template.duplicated: "Issue found in file - Duplicated template ''."
-warning.config.vanilla_loot.type_not_exist: "Issue found in file - 'type' not set for vanilla loot ''."
-warning.config.vanilla_loot.block.invalid_target: "Issue found in file - Invalid block target [] in vanilla loot ''."
-warning.config.sound.duplicated: "Issue found in file - Duplicated sound ''."
-warning.config.jukebox_song.duplicated: "Issue found in file - Duplicated jukebox song ''."
-warning.config.furniture.duplicated: "Issue found in file - Duplicated furniture ''."
-warning.config.furniture.lack_placement: "Issue found in file - The furniture '' is missing the required 'placement' argument."
-warning.config.furniture.element.lack_item: "Issue found in file - The furniture '' is missing the required 'item' argument for one of its elements."
-warning.config.item.duplicated: "Issue found in file - Duplicated item ''."
-warning.config.item.lack_material: "Issue found in file - The item '' is missing the required 'material' argument."
+warning.config.template.duplicate: "Issue found in file - Duplicated template ''. Please check if there is the same configuration in other files."
+warning.config.template.argument.self_increase_int.invalid_range: "Issue found in file - The template '' is using a 'from' '' larger than 'to' '' in 'self_increase_int' argument."
+warning.config.template.argument.list.invalid_type: "Issue found in file - The template '' is using a 'list' argument which expects a 'List' as argument while the input argument is a(n) ''."
+warning.config.vanilla_loot.missing_type: "Issue found in file - The vanilla loot '' is missing the required 'type' argument."
+warning.config.vanilla_loot.invalid_type: "Issue found in file - The vanilla loot '' is using an invalid type ''. Allowed types: []."
+warning.config.vanilla_loot.block.invalid_target: "Issue found in file - Invalid block target '' in vanilla loot ''."
+warning.config.sound.duplicate: "Issue found in file - Duplicated sound ''. Please check if there is the same configuration in other files."
+warning.config.sound.missing_sounds: "Issue found in file - The sound '' is missing the required 'sounds' argument."
+warning.config.sound.missing_name: "Issue found in file - The sound '' is missing the required 'name' argument."
+warning.config.jukebox_song.duplicate: "Issue found in file - Duplicated jukebox song ''. Please check if there is the same configuration in other files."
+warning.config.jukebox_song.missing_sound: "Issue found in file - The jukebox song '' is missing the required 'sound' argument."
+warning.config.furniture.duplicate: "Issue found in file - Duplicated furniture ''. Please check if there is the same configuration in other files."
+warning.config.furniture.missing_placement: "Issue found in file - The furniture '' is missing the required 'placement' argument."
+warning.config.furniture.element.missing_item: "Issue found in file - The furniture '' is missing the required 'item' argument for one of its elements."
+warning.config.furniture.settings.unknown: "Issue found in file - The furniture '' is using an unknown setting type ''."
+warning.config.furniture.hitbox.invalid_type: "Issue found in file - The furniture '' is using an invalid hitbox type ''."
+warning.config.furniture.hitbox.custom.invalid_entity: "Issue found in file - The furniture '' is using a custom hitbox with invalid entity type ''."
+warning.config.item.duplicate: "Issue found in file - Duplicated item ''. Please check if there is the same configuration in other files."
+warning.config.item.settings.unknown: "Issue found in file - The item '' is using an unknown setting type ''."
+warning.config.item.missing_material: "Issue found in file - The item '' is missing the required 'material' argument."
warning.config.item.invalid_material: "Issue found in file - The item '' is using an invalid material type ''."
-warning.config.item.bad_custom_model_data_value: "Issue found in file - The item '' is using a custom model data [] that is too large. It's recommended to use a value lower than 16,777,216."
-warning.config.item.custom_model_data_conflict: "Issue found in file - The item '' is using a custom model data [] that has been occupied by item ''"
-warning.config.item.lack_model_id: "Issue found in file - The item '' is missing the required 'custom-model-data' or 'item-model' argument."
-warning.config.block.duplicated: "Issue found in file - Duplicated block ''."
-warning.config.block.lack_state: "Issue found in file - The block '' is missing the required 'state' argument."
-warning.config.block.state.lack_real_id: "Issue found in file - The block '' is missing the required 'id' argument for 'state'."
-warning.config.block.state.lack_state: "Issue found in file - The block '' is missing the required 'state' argument for 'state'."
-warning.config.block.state.lack_properties: "Issue found in file - The block '' is missing the required 'properties' section for 'states'."
-warning.config.block.state.lack_appearances: "Issue found in file - The block '' is missing the required 'appearances' section for 'states'."
-warning.config.block.state.lack_variants: "Issue found in file - The block '' is missing the required 'variants' section for 'states'."
-warning.config.block.state.variant.lack_appearance: "Issue found in file - The block '' is missing the required 'appearance' argument for variant ''."
+warning.config.item.bad_custom_model_data: "Issue found in file - The item '' is using a custom model data '' that is too large. It's recommended to use a value lower than 16,777,216."
+warning.config.item.custom_model_data_conflict: "Issue found in file - The item '' is using a custom model data '' that has been occupied by item ''."
+warning.config.item.missing_model_id: "Issue found in file - The item '' is missing the required 'custom-model-data' or 'item-model' argument."
+warning.config.item.behavior.missing_type: "Issue found in file - The item '' is missing the required 'type' argument for its item behavior."
+warning.config.item.behavior.invalid_type: "Issue found in file - The item '' is using an invalid item behavior type ''."
+warning.config.item.behavior.block.missing_block: "Issue found in file - The item '' is missing the required 'block' argument for 'block_item' behavior."
+warning.config.item.behavior.furniture.missing_furniture: "Issue found in file - The item '' is missing the required 'furniture' argument for 'furniture_item' behavior."
+warning.config.item.behavior.liquid_collision.missing_block: "Issue found in file - The item '' is missing the required 'block' argument for 'liquid_collision_block_item' behavior."
+warning.config.item.model.invalid_type: "Issue found in file - The item '' is using an invalid model type ''."
+warning.config.item.model.tint.missing_type: "Issue found in file - The item '' is missing the required 'type' argument for tint."
+warning.config.item.model.tint.invalid_type: "Issue found in file - The item '' is using an invalid tint type ''."
+warning.config.item.model.tint.constant.missing_value: "Issue found in file - The item '' is missing the required 'value' argument for constant tint."
+warning.config.item.model.tint.grass.invalid_temp: "Issue found in file - The item '' is using an invalid temperature '' for grass tint, which is expected to be between 0 and 1."
+warning.config.item.model.tint.grass.invalid_downfall: "Issue found in file - The item '' is using an invalid downfall '' for grass tint, which is expected to be between 0 and 1."
+warning.config.item.model.tint.invalid_value: "Issue found in file - The item '' is using an invalid tint ''."
+warning.config.item.model.base.missing_path: "Issue found in file - The item '' is missing the required 'path' argument for model 'minecraft:model'."
+warning.config.item.model.base.invalid_path: "Issue found in file - The item '' has an invalid 'path' argument '' for model 'minecraft:model' which contains illegal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters."
+warning.config.item.model.condition.missing_property: "Issue found in file - The item '' is missing the required 'property' argument for model 'minecraft:condition'."
+warning.config.item.model.condition.invalid_property: "Issue found in file - The item '' is using an invalid property '' for model 'minecraft:condition'."
+warning.config.item.model.condition.missing_on_true: "Issue found in file - The item '' is missing the required 'on-true' argument for model 'minecraft:condition'."
+warning.config.item.model.condition.missing_on_false: "Issue found in file - The item '' is missing the required 'on-false' argument for model 'minecraft:condition'."
+warning.config.item.model.condition.keybind.missing: "Issue found in file - The item '' is missing the required 'keybind' argument for property 'minecraft:keybind_down'."
+warning.config.item.model.condition.has_component.missing_component: "Issue found in file - The item '' is missing the required 'component' argument for property 'minecraft:has_component'."
+warning.config.item.model.composite.missing_models: "Issue found in file - The item '' is missing the required 'models' argument for 'minecraft:composite' model."
+warning.config.item.model.range_dispatch.missing_property: "Issue found in file - The item '' is missing the required 'property' argument for model 'minecraft:range_dispatch'."
+warning.config.item.model.range_dispatch.invalid_property: "Issue found in file - The item '' is using an invalid property '' for model 'minecraft:range_dispatch'."
+warning.config.item.model.range_dispatch.missing_entries: "Issue found in file - The item '' is missing the required 'entries' argument for model 'minecraft:composite'."
+warning.config.item.model.range_dispatch.entry.missing_model: "Issue found in file - The item '' is missing the required 'model' argument for one of the entries in model 'minecraft:composite'."
+warning.config.item.model.range_dispatch.compass.missing_target: "Issue found in file - The item '' is missing the required 'target' argument for property 'minecraft:compass'."
+warning.config.item.model.range_dispatch.time.missing_source: "Issue found in file - The item '' is missing the required 'source' argument for property 'minecraft:time'."
+warning.config.item.model.select.missing_property: "Issue found in file - The item '' is missing the required 'property' argument for model 'minecraft:select'."
+warning.config.item.model.select.invalid_property: "Issue found in file - The item '' is using an invalid property '' for model 'minecraft:select'."
+warning.config.item.model.select.missing_cases: "Issue found in file - The item '' is missing the required 'cases' argument for model 'minecraft:select'."
+warning.config.item.model.select.case.missing_when: "Issue found in file - The item '' is missing the required 'when' argument for one of the cases in model 'minecraft:select'."
+warning.config.item.model.select.case.missing_model: "Issue found in file - The item '' is missing the required 'model' argument for one of the cases in model 'minecraft:select'."
+warning.config.item.model.select.block_state.missing_property: "Issue found in file - The item '' is missing the required 'block-state-property' argument for property 'minecraft:block_state'."
+warning.config.item.model.select.local_time.missing_pattern: "Issue found in file - The item '' is missing the required 'pattern' argument for property 'minecraft:local_time'."
+warning.config.item.model.special.missing_type: "Issue found in file - The item '' is missing the required 'type' argument for model 'minecraft:special'."
+warning.config.item.model.special.invalid_type: "Issue found in file - The item '' is using an invalid type '' for model 'minecraft:special'."
+warning.config.item.model.special.banner.missing_color: "Issue found in file - The item '' is missing the required 'color' argument for special model 'minecraft:banner'."
+warning.config.item.model.special.bed.missing_texture: "Issue found in file - The item '' is missing the required 'texture' argument for special model 'minecraft:bed'."
+warning.config.item.model.special.sign.missing_wood_type: "Issue found in file - The item '' is missing the required 'wood-type' argument for special model 'minecraft:hanging_sign'/'minecraft:standing_sign'."
+warning.config.item.model.special.sign.missing_texture: "Issue found in file - The item '' is missing the required 'texture' argument for special model 'minecraft:hanging_sign'/'minecraft:standing_sign'."
+warning.config.item.model.special.chest.missing_texture: "Issue found in file - The item '' is missing the required 'texture' argument for special model 'minecraft:chest'."
+warning.config.item.model.special.chest.invalid_openness: "Issue found in file - The item '' is using an invalid 'openness' value '' for special model 'minecraft:chest'. Valid range '0~1.'"
+warning.config.item.model.special.shulker_box.missing_texture: "Issue found in file - The item '' is missing the required 'texture' argument for special model 'minecraft:shulker_box'."
+warning.config.item.model.special.shulker_box.invalid_openness: "Issue found in file - The item '' is using an invalid 'openness' value '' for special model 'minecraft:shulker_box'. Valid range '0~1.'"
+warning.config.item.model.special.head.missing_kind: "Issue found in file - The item '' is missing the required 'kind' argument for special model 'minecraft:head'."
+warning.config.item.model.special.head.missing_texture: "Issue found in file - The item '' is missing the required 'texture' argument for special model 'minecraft:head'."
+warning.config.block.duplicate: "Issue found in file - Duplicated block ''. Please check if there is the same configuration in other files."
+warning.config.block.missing_state: "Issue found in file - The block '' is missing the required 'state' argument."
+warning.config.block.state.property.missing_type: "Issue found in file - The block '' is missing the required 'type' argument for property ''."
+warning.config.block.state.property.invalid_type: "Issue found in file - The block '' is using the invalid type argument '' for property ''."
+warning.config.block.state.property.integer.invalid_range: "Issue found in file - The block '' is using the invalid 'range' argument '' for integer property ''. Correct syntax: 1~2."
+warning.config.block.state.property.invalid_format: "Issue found in file - The block '' is using an invalid block state property format ''."
+warning.config.block.state.missing_real_id: "Issue found in file - The block '' is missing the required 'id' argument for 'state'. 'id' is the serverside block id which is unique for each type of block state. If you create a serverside side block with 'note_block' and id 30, then the real block id would be 'craftengine:note_block_30'."
+warning.config.block.state.missing_state: "Issue found in file - The block '' is missing the required 'state' argument for 'state'."
+warning.config.block.state.missing_properties: "Issue found in file - The block '' is missing the required 'properties' section for 'states'."
+warning.config.block.state.missing_appearances: "Issue found in file - The block '' is missing the required 'appearances' section for 'states'."
+warning.config.block.state.missing_variants: "Issue found in file - The block '' is missing the required 'variants' section for 'states'."
+warning.config.block.state.variant.missing_appearance: "Issue found in file - The block '' is missing the required 'appearance' argument for variant ''."
warning.config.block.state.variant.invalid_appearance: "Issue found in file - The block '' has an error that the variant '' is using a non-existing appearance ''."
-warning.config.block.state.invalid_state: "Issue found in file - The block '' is using an invalid vanilla block state ''."
-warning.config.block.state.unavailable_state: "Issue found in file - The block '' is using an unavailable vanilla block state ''."
-warning.config.block.state.invalid_vanilla_state_id: "Issue found in file - The block '' is using a vanilla block state '' that exceeds the available slot range '0~'."
-warning.config.block.state.conflict: "Issue found in file - The block '' is using a vanilla block state '' that has been occupied by ''."
-warning.config.block.state.bind_real_state: "Issue found in file - The block '' failed to bind real block state for '' as the state has been occupied by ''."
-warning.config.block.state.invalid_property_structure: "Issue found in file - The block '' has an invalid property structure ''."
-warning.config.block.state.invalid_property: "Issue found in file - Failed to create property '' for block '': ."
-warning.config.block.state.no_model_set: "Issue found in file - The block '' is missing the required 'model' or 'models' argument."
-warning.config.block.state.invalid_real_state_id: "Issue found in file - The block '' is using a real block state '' that exceeds the available slot range '0~'. Consider adding more real states in 'additional-real-blocks.yml' if the slots are used up."
-warning.config.block.state.model.lack_path: "Issue found in file - The block '' is missing the required 'path' option for 'model'."
-warning.config.block.state.model.invalid_resource_location: "Issue found in file - The block '' has a 'path' argument [] that contains legal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters"
-warning.config.model.generation.conflict: "Issue found in file - Failed to generate model for '' as two or more configurations attempt to generate different json models with the same path: ''"
-warning.config.model.generation.texture.invalid_resource_location: "Issue found in file - The config '' has a '' texture argument [] that contains legal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters"
-warning.config.model.generation.parent.invalid_resource_location: "Issue found in file - The config '' has a parent argument [] that contains legal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters"
-warning.config.emoji.lack_keywords: "Issue found in file - The emoji '' is missing the required 'keywords' argument."
-warning.config.emoji.duplicated: "Issue found in file - Duplicated emoji ''."
+warning.config.block.state.invalid_vanilla: "Issue found in file - The block '' is using an invalid vanilla block state ''."
+warning.config.block.state.unavailable_vanilla: "Issue found in file - The block '' is using an unavailable vanilla block state ''. Please free that state in mappings.yml."
+warning.config.block.state.invalid_vanilla_id: "Issue found in file - The block '' is using a vanilla block state '' that exceeds the available slot range '0~'."
+warning.config.block.state.conflict: "Issue found in file - The block '' is using a vanilla block state '' that has been occupied by ''."
+warning.config.block.state.bind_failed: "Issue found in file - The block '' failed to bind real block state for '' as the state has been occupied by ''."
+warning.config.block.state.missing_model: "Issue found in file - The block '' is missing the required 'model' or 'models' argument."
+warning.config.block.state.invalid_real_id: "Issue found in file - The block '' is using a real block state '' that exceeds the available slot range '0~'. Consider adding more real states in 'additional-real-blocks.yml' if the slots are used up."
+warning.config.block.state.model.missing_path: "Issue found in file - The block '' is missing the required 'path' option for 'model'."
+warning.config.block.state.model.invalid_path: "Issue found in file - The block '' has a 'path' argument '' that contains illegal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters."
+warning.config.block.settings.unknown: "Issue found in file - The block '' is using an unknown setting type ''."
+warning.config.block.behavior.missing_type: "Issue found in file - The block '' is missing the required 'type' argument for its block behavior."
+warning.config.block.behavior.invalid_type: "Issue found in file - The block '' is using an invalid block behavior type ''."
+warning.config.block.behavior.concrete.missing_solid: "Issue found in file - The block '' is missing the required 'solid-block' option for 'concrete_block' behavior."
+warning.config.block.behavior.crop.missing_age: "Issue found in file - The block '' is missing the required 'age' property for 'crop_block' behavior."
+warning.config.block.behavior.sugar_cane.missing_age: "Issue found in file - The block '' is missing the required 'age' property for 'sugar_cane_block' behavior."
+warning.config.block.behavior.leaves.missing_persistent: "Issue found in file - The block '' is missing the required 'persistent' property for 'leaves_block' behavior."
+warning.config.block.behavior.leaves.missing_distance: "Issue found in file - The block '' is missing the required 'distance' property for 'leaves_block' behavior."
+warning.config.block.behavior.sapling.missing_stage: "Issue found in file - The block '' is missing the required 'stage' property for 'sapling_block' behavior."
+warning.config.block.behavior.sapling.missing_feature: "Issue found in file - The block '' is missing the required 'feature' argument for 'sapling_block' behavior."
+warning.config.block.behavior.strippable.missing_stripped: "Issue found in file - The block '' is missing the required 'stripped' argument for 'strippable_block' behavior."
+warning.config.model.generation.missing_parent: "Issue found in file - The config '' is missing the required 'parent' argument in 'generation' section."
+warning.config.model.generation.conflict: "Issue found in file - Failed to generate model for '' as two or more configurations attempt to generate different json models with the same path: ''."
+warning.config.model.generation.texture.invalid: "Issue found in file - The config '' has a texture '' with path '' that contains illegal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters."
+warning.config.model.generation.parent.invalid: "Issue found in file - The config '' has a parent argument '' that contains illegal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters."
+warning.config.emoji.missing_keywords: "Issue found in file - The emoji '' is missing the required 'keywords' argument."
+warning.config.emoji.duplicate: "Issue found in file - Duplicated emoji ''. Please check if there is the same configuration in other files."
warning.config.emoji.invalid_image: "Issue found in file - The emoji '' has an invalid 'image' argument ''."
-warning.config.advancement.duplicated: "Issue found in file - Duplicated advancement ''."
-warning.config.host.lack_type: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'type' for host."
-warning.config.host.invalid_type: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Host 'type' [] is invalid. Please read https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine/plugin-wiki/craftengine/resource-pack/host"
-warning.config.host.external.lack_url: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'url' for external host."
-warning.config.host.alist.lack_api_url: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'api-url' for alist host."
-warning.config.host.alist.lack_username: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'username' or environment variable 'CE_ALIST_USERNAME' for alist host."
-warning.config.host.alist.lack_password: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'password' or environment variable 'CE_ALIST_PASSWORD' for alist host."
-warning.config.host.alist.lack_upload_path: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'upload-path' for alist host."
-warning.config.host.dropbox.lack_app_key: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'app-key' or environment variable 'CE_DROPBOX_APP_KEY' for dropbox host."
-warning.config.host.dropbox.lack_app_secret: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'app-secret' or environment variable 'CE_DROPBOX_APP_SECRET' for dropbox host."
-warning.config.host.dropbox.lack_refresh_token: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'refresh-token' or environment variable 'CE_DROPBOX_REFRESH_TOKEN' for dropbox host."
-warning.config.host.dropbox.lack_upload_path: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'upload-path' for dropbox host."
-warning.config.host.lobfile.lack_api_key: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'api-key' for lobfile host."
-warning.config.host.onedrive.lack_client_id: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'client-id' or environment variable 'CE_ONEDRIVE_CLIENT_ID' for onedrive host."
-warning.config.host.onedrive.lack_client_secret: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'client-secret' or environment variable 'CE_ONEDRIVE_CLIENT_SECRET' for onedrive host."
-warning.config.host.onedrive.lack_refresh_token: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'refresh-token' or environment variable 'CE_ONEDRIVE_REFRESH_TOKEN' for onedrive host."
-warning.config.host.onedrive.lack_upload_path: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'upload-path' for onedrive host."
-warning.config.host.s3.lack_endpoint: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'endpoint' for s3 host."
-warning.config.host.s3.lack_bucket: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'bucket' for s3 host."
-warning.config.host.s3.lack_access_key_id: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'access-key-id' or environment variable 'CE_S3_ACCESS_KEY_ID' for s3 host."
-warning.config.host.s3.lack_access_key_secret: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'access-key-secret' or environment variable 'CE_S3_ACCESS_KEY_SECRET' for s3 host."
-warning.config.host.s3.lack_upload_path: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'upload-path' for s3 host."
-warning.config.host.self.lack_ip: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing require argument 'ip' for self host."
-warning.config.host.self.invalid_port: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Invalid 'port' [] for self host."
\ No newline at end of file
+warning.config.advancement.duplicate: "Issue found in file - Duplicated advancement ''. Please check if there is the same configuration in other files."
+warning.config.loot_table.missing_pools: "Issue found in file - '' has a misconfigured loot table which is missing the required 'pools' argument."
+warning.config.loot_table.invalid_pools_type: "Issue found in file - '' has a misconfigured loot table, 'pools' should be a string/map list, current type: ''."
+warning.config.loot_table.invalid_conditions_type: "Issue found in file - '' has a misconfigured loot table, 'conditions' should be a map list, current type: ''."
+warning.config.loot_table.invalid_functions_type: "Issue found in file - '' has a misconfigured loot table, 'functions' should be a map list, current type: ''."
+warning.config.loot_table.invalid_entries_type: "Issue found in file - '' has a misconfigured loot table, 'entries' should be a map list, current type: ''."
+warning.config.loot_table.function.missing_type: "Issue found in file - '' has a misconfigured loot table, one of the functions is missing the required 'type' argument."
+warning.config.loot_table.function.invalid_type: "Issue found in file - '' has a misconfigured loot table, one of the functions is using an invalid function type ''."
+warning.config.loot_table.function.apply_bonus.missing_enchantment: "Issue found in file - '' has a misconfigured loot table, function 'apply_bonus' is missing the required 'enchantment' argument."
+warning.config.loot_table.function.apply_bonus.missing_formula: "Issue found in file - '' has a misconfigured loot table, function 'apply_bonus' is missing the required 'formula' argument."
+warning.config.loot_table.function.drop_exp.missing_count: "Issue found in file - '' has a misconfigured loot table, function 'drop_exp' is missing the required 'count' argument."
+warning.config.loot_table.function.set_count.missing_count: "Issue found in file - '' has a misconfigured loot table, function 'set_count' is missing the required 'count' argument."
+warning.config.loot_table.entry.missing_type: "Issue found in file - '' has a misconfigured loot table, one of the entries is missing the required 'type' argument."
+warning.config.loot_table.entry.invalid_type: "Issue found in file - '' has a misconfigured loot table, one of the entries is using an invalid entry type ''."
+warning.config.loot_table.entry.exp.missing_count: "Issue found in file - '' has a misconfigured loot table, entry 'exp' is missing the required 'count' argument."
+warning.config.loot_table.entry.item.missing_item: "Issue found in file - '' has a misconfigured loot table, entry 'item' is missing the required 'item' argument."
+warning.config.loot_table.condition.missing_type: "Issue found in file - '' has a misconfigured loot table, one of the conditions is missing the required 'type' argument."
+warning.config.loot_table.condition.invalid_type: "Issue found in file - '' has a misconfigured loot table, one of the conditions is using an invalid condition type ''."
+warning.config.loot_table.condition.table_bonus.missing_enchantment: "Issue found in file - '' has a misconfigured loot table, 'table_bonus' condition is missing the required 'enchantment' argument."
+warning.config.loot_table.condition.table_bonus.missing_chances: "Issue found in file - '' has a misconfigured loot table, 'table_bonus' condition is missing the required 'chances' argument."
+warning.config.loot_table.number.missing_type: "Issue found in file - '' has a misconfigured loot table, one of the numbers is missing the required 'type' argument."
+warning.config.loot_table.number.invalid_type: "Issue found in file - '' has a misconfigured loot table, one of the numbers is using an invalid number type ''."
+warning.config.host.missing_type: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'type' argument for host."
+warning.config.host.invalid_type: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Host type '' is invalid. Please read https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine/plugin-wiki/craftengine/resource-pack/host."
+warning.config.host.external.missing_url: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'url' argument for external host."
+warning.config.host.alist.missing_api_url: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'api-url' argument for alist host."
+warning.config.host.alist.missing_username: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'username' argument or environment variable 'CE_ALIST_USERNAME' for alist host."
+warning.config.host.alist.missing_password: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'password' argument or environment variable 'CE_ALIST_PASSWORD' for alist host."
+warning.config.host.alist.missing_upload_path: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'upload-path' argument for alist host."
+warning.config.host.dropbox.missing_app_key: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'app-key' argument or environment variable 'CE_DROPBOX_APP_KEY' for dropbox host."
+warning.config.host.dropbox.missing_app_secret: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'app-secret' argument or environment variable 'CE_DROPBOX_APP_SECRET' for dropbox host."
+warning.config.host.dropbox.missing_refresh_token: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'refresh-token' argument or environment variable 'CE_DROPBOX_REFRESH_TOKEN' for dropbox host."
+warning.config.host.dropbox.missing_upload_path: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'upload-path' argument for dropbox host."
+warning.config.host.lobfile.missing_api_key: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'api-key' argument for lobfile host."
+warning.config.host.onedrive.missing_client_id: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'client-id' argument or environment variable 'CE_ONEDRIVE_CLIENT_ID' for onedrive host."
+warning.config.host.onedrive.missing_client_secret: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'client-secret' argument or environment variable 'CE_ONEDRIVE_CLIENT_SECRET' for onedrive host."
+warning.config.host.onedrive.missing_refresh_token: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'refresh-token' argument or environment variable 'CE_ONEDRIVE_REFRESH_TOKEN' for onedrive host."
+warning.config.host.onedrive.missing_upload_path: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'upload-path' argument for onedrive host."
+warning.config.host.s3.missing_endpoint: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'endpoint' argument for s3 host."
+warning.config.host.s3.missing_bucket: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'bucket' argument for s3 host."
+warning.config.host.s3.missing_access_key: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'access-key-id' argument or environment variable 'CE_S3_ACCESS_KEY_ID' for s3 host."
+warning.config.host.s3.missing_secret: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'access-key-secret' argument or environment variable 'CE_S3_ACCESS_KEY_SECRET' for s3 host."
+warning.config.host.s3.missing_upload_path: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'upload-path' argument for s3 host."
+warning.config.host.self.missing_ip: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'ip' argument for self host."
+warning.config.host.self.invalid_port: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Invalid port '' for self host."
+warning.config.host.gitlab.missing_url: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'gitlab-url' argument for gitlab host."
+warning.config.host.gitlab.missing_token: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'access-token' argument for gitlab host."
+warning.config.host.gitlab.missing_project: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'project-id' argument for gitlab host."
+warning.config.host.proxy.missing_host: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'host' argument for proxy."
+warning.config.host.proxy.missing_port: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'port' argument for proxy."
+warning.config.host.proxy.missing_scheme: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Missing required 'scheme' argument for proxy."
+warning.config.host.proxy.invalid: "Issue found in config.yml at 'resource-pack.delivery.hosting' - Invalid proxy ''."
+warning.config.conflict_matcher.missing_type: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'type' argument for one of the handlers."
+warning.config.conflict_matcher.invalid_type: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - One of the terms is using the invalid type ''."
+warning.config.conflict_matcher.exact.missing_path: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'path' argument for 'exact' matcher."
+warning.config.conflict_matcher.contains.missing_path: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'path' argument for 'contains' matcher."
+warning.config.conflict_matcher.filename.missing_name: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'path' argument for 'filename' matcher."
+warning.config.conflict_matcher.pattern.missing_pattern: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'pattern' argument for 'pattern' matcher."
+warning.config.conflict_matcher.parent_prefix.missing_prefix: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'prefix' argument for 'parent_path_prefix' matcher."
+warning.config.conflict_matcher.parent_suffix.missing_suffix: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'suffix' argument for 'parent_path_suffix' matcher."
+warning.config.conflict_matcher.inverted.missing_term: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'term' argument for 'inverted' matcher."
+warning.config.conflict_matcher.all_of.missing_terms: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'terms' argument for 'all_of' matcher."
+warning.config.conflict_matcher.any_of.missing_terms: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'terms' argument for 'any_of' matcher."
+warning.config.conflict_resolution.missing_type: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'type' argument for one of the resolutions."
+warning.config.conflict_resolution.invalid_type: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - One of the resolutions is using the invalid type ''."
\ No newline at end of file
diff --git a/bukkit/loader/src/main/resources/translations/zh_cn.yml b/bukkit/loader/src/main/resources/translations/zh_cn.yml
index e3383afee..860a110af 100644
--- a/bukkit/loader/src/main/resources/translations/zh_cn.yml
+++ b/bukkit/loader/src/main/resources/translations/zh_cn.yml
@@ -1,6 +1,7 @@
# 别动这个
lang-version: "${lang_version}"
+# 命令
exception.invalid_syntax: "无效语法. 正确语法: "
exception.invalid_argument: "无效参数. 原因: "
exception.invalid_sender: " 不允许执行该命令. 执行者必须是 "
@@ -63,56 +64,213 @@ command.upload.failure.not_supported: "当前托管模式 '' 不支
command.upload.on_progress: "已开始上传进程. 检查控制台以获取详细信息."
command.send_resource_pack.success.single: "发送资源包给 "
command.send_resource_pack.success.multiple: "发送资源包给 个玩家"
-warning.config.image.duplicated: "在文件 中发现问题 - 图片 '' 重复定义"
-warning.config.image.lack_height: "在文件 中发现问题 - 图片 '' 缺少必要的 'height' 高度参数"
-warning.config.image.height_smaller_than_ascent: "在文件 中发现问题 - 图片 '' 违反位图规则:'height' 高度值不应小于 'ascent' 基准线高度"
-warning.config.image.no_file: "在文件 中发现问题 - 图片 '' 缺少必要的 'file' 文件参数"
-warning.config.image.invalid_resource_location: "在文件 中发现问题 - 图片 '' 的 'file' 参数 [] 包含非法字符,请参考资源路径规范:https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
-warning.config.image.invalid_font_name: "在文件 中发现问题 - 图片 '' 的 'font' 字体参数 [] 包含非法字符,请参考资源路径规范:https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
-warning.config.image.lack_char: "在文件 中发现问题 - 图片 '' 缺少必要的 'char' 字符参数"
-warning.config.image.codepoint_in_use: "在文件 中发现问题 - 图片 '' 使用的字体 字符 [()] 已被其他图片 '' 占用"
-warning.config.image.invalid_codepoint_grid: "在文件 中发现问题 - 图片 '' 的 'chars' 码位网格配置无效"
-warning.config.image.file_not_exist: "在文件 中发现问题 - 图片 '' 对应的PNG文件 不存在"
-warning.config.recipe.duplicated: "在文件 中发现问题 - 配方 '' 重复定义"
-warning.config.i18n.unknown_locale: "在文件 中发现问题 - 未知的语言区域 ''"
-warning.config.template.duplicated: "在文件 中发现问题 - 模板 '' 重复定义"
-warning.config.vanilla_loot.type_not_exist: "在文件 中发现问题 - 原版战利品 '' 未设置 'type' 类型参数"
-warning.config.vanilla_loot.block.invalid_target: "在文件 中发现问题 - 原版战利品 '' 中的方块目标 [] 无效"
-warning.config.sound.duplicated: "在文件 中发现问题 - 音效 '' 重复定义"
-warning.config.jukebox_song.duplicated: "在文件 中发现问题 - 唱片机歌曲 '' 重复定义"
-warning.config.furniture.duplicated: "在文件 中发现问题 - 家具 '' 重复定义"
-warning.config.furniture.lack_placement: "在文件 中发现问题 - 家具 '' 缺少必要的 'placement' 放置参数"
-warning.config.furniture.element.lack_item: "在文件 中发现问题 - 家具 '' 的某个元素缺少必要的 'item' 物品参数"
-warning.config.item.duplicated: "在文件 中发现问题 - 物品 '' 重复定义"
-warning.config.item.lack_material: "在文件 中发现问题 - 物品 '' 缺少必要的 'material' 材料参数"
-warning.config.item.invalid_material: "在文件 中发现问题 - 物品 '' 使用了无效的材料类型 ''"
-warning.config.item.bad_custom_model_data_value: "在文件 中发现问题 - 物品 '' 的自定义模型数据值 [] 过大,建议使用低于16,777,216的值"
-warning.config.item.custom_model_data_conflict: "在文件 中发现问题 - 物品 '' 的自定义模型数据 [] 与物品 '' 发生冲突"
-warning.config.item.lack_model_id: "在文件 中发现问题 - 物品 '' 缺少必要的 'custom-model-data' 或 'item-model' 模型标识参数"
-warning.config.block.duplicated: "在文件 中发现问题 - 方块 '' 重复定义"
-warning.config.block.lack_state: "在文件 中发现问题 - 方块 '' 缺少必要的 'state' 状态参数"
-warning.config.block.state.lack_real_id: "在文件 中发现问题 - 方块 '' 的 'state' 配置缺少必要的 'id' 标识参数"
-warning.config.block.state.lack_state: "在文件 中发现问题 - 方块 '' 的 'state' 配置缺少必要的 'state' 状态参数"
-warning.config.block.state.lack_properties: "在文件 中发现问题 - 方块 '' 的 'states' 配置缺少必要的 'properties' 属性配置"
-warning.config.block.state.lack_appearances: "在文件 中发现问题 - 方块 '' 的 'states' 配置缺少必要的 'appearances' 外观配置"
-warning.config.block.state.lack_variants: "在文件 中发现问题 - 方块 '' 的 'states' 配置缺少必要的 'variants' 变体配置"
-warning.config.block.state.variant.lack_appearance: "在文件 中发现问题 - 方块 '' 的 '' 变体配置缺少必要的 'appearance' 外观参数"
-warning.config.block.state.variant.invalid_appearance: "在文件 中发现问题 - 方块 '' 的 '' 变体引用了不存在的外观配置 ''"
-warning.config.block.state.invalid_state: "在文件 中发现问题 - 方块 '' 使用了无效的原版方块状态 ''"
-warning.config.block.state.unavailable_state: "在文件 中发现问题 - 方块 '' 使用了不可用的原版方块状态 ''"
-warning.config.block.state.invalid_vanilla_state_id: "在文件 中发现问题 - 方块 '' 使用的原版方块状态 '' 超出可用槽位范围 '0~'"
-warning.config.block.state.conflict: "在文件 中发现问题 - 方块 '' 使用的原版方块状态 '' 已被 '' 占用"
-warning.config.block.state.bind_real_state: "在文件 中发现问题 - 方块 '' 未能绑定真实方块状态 '',该状态已被 '' 占用"
-warning.config.block.state.invalid_property_structure: "在文件 中发现问题 - 方块 '' 的属性结构 '' 配置无效"
-warning.config.block.state.invalid_property: "在文件 中发现问题 - 无法为方块 '' 创建属性 '':"
-warning.config.block.state.no_model_set: "在文件 中发现问题 - 方块 '' 缺少必要的 'model' 或 'models' 模型参数"
-warning.config.block.state.invalid_real_state_id: "在文件 中发现问题 - 方块 '' 使用的真实方块状态 '' 超出可用槽位范围 '0~'。若槽位已用尽,请考虑在 additional-real-blocks.yml 中添加更多真实状态"
-warning.config.block.state.model.lack_path: "在文件 中发现问题 - 方块 '' 的 'model' 配置缺少必要的 'path' 路径参数"
-warning.config.block.state.model.invalid_resource_location: "在文件 中发现问题 - 方块 '' 的 'path' 路径参数 [] 包含非法字符,请参考资源路径规范:https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
-warning.config.model.generation.conflict: "在文件 中发现问题 - 无法为 '' 生成模型,多个配置尝试用相同路径 '' 生成不同的JSON模型"
-warning.config.model.generation.texture.invalid_resource_location: "在文件 中发现问题 - 配置项 '' 的 '' 纹理参数 [] 包含非法字符,请参考资源路径规范:https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
-warning.config.model.generation.parent.invalid_resource_location: "在文件 中发现问题 - 配置项 '' 的父模型参数 [] 包含非法字符,请参考资源路径规范:https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
-warning.config.emoji.lack_keywords: "在文件 中发现问题 - 表情 '' 缺少必要的 'keywords' 配置"
-warning.config.emoji.duplicated: "在文件 中发现问题 - 表情 '' 重复定义"
-warning.config.emoji.invalid_image: "在文件 中发现问题 - 表情 '' 使用了无效的 'image' 图片参数 ''."
-warning.config.advancement.duplicated: "在文件 中发现问题 - 进度 '' 重复定义"
\ No newline at end of file
+warning.config.pack.duplicated_files: "发现重复文件 请通过 config.yml 的 'resource-pack.duplicated-files-handler' 部分解决"
+warning.config.type.int: "在文件 发现问题 - 无法加载 '': 无法将 '' 转换为整数类型 (选项 '')"
+warning.config.type.float: "在文件 发现问题 - 无法加载 '': 无法将 '' 转换为浮点数类型 (选项 '')"
+warning.config.type.double: "在文件 发现问题 - 无法加载 '': 无法将 '' 转换为双精度类型 (选项 '')"
+warning.config.type.quaternionf: "在文件 发现问题 - 无法加载 '': 无法将 '' 转换为四元数类型 (选项 '')"
+warning.config.type.vector3f: "在文件 发现问题 - 无法加载 '': 无法将 '' 转换为三维向量类型 (选项 '')"
+warning.config.structure.not_section: "在文件 发现问题 - 配置项 '' 应为配置段落 但实际类型为 ''"
+warning.config.image.duplicate: "在文件 发现问题 - 重复的图片配置 '' 请检查其他文件中是否存在相同配置"
+warning.config.image.missing_height: "在文件 发现问题 - 图片 '' 缺少必需的 'height' 参数"
+warning.config.image.height_ascent_conflict: "在文件 发现问题 - 图片 '' 违反位图规则: 'height' 参数 '' 必须不小于 'ascent' 参数 ''"
+warning.config.image.missing_file: "在文件 发现问题 - 图片 '' 缺少必需的 'file' 参数"
+warning.config.image.invalid_file_chars: "在文件 发现问题 - 图片 '' 的 'file' 参数 '' 包含非法字符 请参考 https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
+warning.config.image.invalid_font_chars: "在文件 发现问题 - 图片 '' 的 'font' 参数 '' 包含非法字符 请参考 https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
+warning.config.image.missing_char: "在文件 发现问题 - 图片 '' 缺少必需的 'char' 参数"
+warning.config.image.codepoint_conflict: "在文件 发现问题 - 图片 '' 在字体 中使用的字符 '()' 已被其他图片 '' 占用"
+warning.config.image.invalid_codepoint_grid: "在文件 发现问题 - 图片 '' 的 'chars' 码位网格无效"
+warning.config.image.file_not_found: "在文件 发现问题 - 图片 '' 的 PNG 文件 '' 未找到"
+warning.config.image.invalid_hex_value: "在文件 发现问题 - 图片 '' 使用的 Unicode 字符 '' 不是有效的十六进制值"
+warning.config.recipe.duplicate: "在文件 发现问题 - 重复的配方 '' 请检查其他文件中是否存在相同配置"
+warning.config.recipe.missing_type: "在文件 发现问题 - 配方 '' 缺少必需的 'type' 参数"
+warning.config.recipe.invalid_type: "在文件 发现问题 - 配方 '' 使用了无效的配方类型 ''"
+warning.config.recipe.invalid_item: "在文件 发现问题 - 配方 '' 使用了无效的物品 ''"
+warning.config.recipe.missing_ingredient: "在文件 发现问题 - 烧炼配方 '' 缺少必需的 'ingredient' 参数"
+warning.config.recipe.missing_result: "在文件 发现问题 - 配方 '' 缺少必需的 'result' 参数"
+warning.config.recipe.result.missing_id: "在文件 发现问题 - 配方 '' 的结果缺少必需的 'id' 参数"
+warning.config.recipe.crafting.invalid_category: "在文件 发现问题 - 合成配方 '' 使用了无效的分类 '' 允许的分类: []"
+warning.config.recipe.cooking.invalid_category: "在文件 发现问题 - 烧炼配方 '' 使用了无效的分类 '' 允许的分类: []"
+warning.config.recipe.shaped.missing_pattern: "在文件 发现问题 - 有序合成配方 '' 缺少必需的 'pattern' 参数"
+warning.config.recipe.shaped.invalid_pattern: "在文件 发现问题 - 有序合成配方 '' 使用了无效的图案 ''"
+warning.config.recipe.shaped.invalid_symbol: "在文件 发现问题 - 有序合成配方 '' 在图案中使用了无效符号 ''"
+warning.config.recipe.smithing_transform.post_processor.missing_type: "在文件 发现问题 - 锻造升级配方 '' 的后处理器缺少必需的 'type' 参数"
+warning.config.recipe.smithing_transform.post_processor.invalid_type: "在文件 发现问题 - 锻造升级配方 '' 使用了无效的后处理器类型 ''"
+warning.config.recipe.smithing_transform.post_processor.keep_component.missing_components: "在文件 发现问题 - 锻造升级配方 '' 的 'keep_components' 后处理器缺少必需的 'components' 参数"
+warning.config.recipe.smithing_transform.post_processor.keep_component.missing_tags: "在文件 发现问题 - 锻造升级配方 '' 的 'keep_tags' 后处理器缺少必需的 'tags' 参数"
+warning.config.i18n.unknown_locale: "在文件 发现问题 - 未知的语言环境 ''"
+warning.config.template.duplicate: "在文件 发现问题 - 重复的模板 '' 请检查其他文件中是否存在相同配置"
+warning.config.template.argument.self_increase_int.invalid_range: "在文件 发现问题 - 模板 '' 在 'self_increase_int' 参数中使用了一个起始值 '' 大于终止值 ''"
+warning.config.template.argument.list.invalid_type: "在文件 发现问题 - 模板 '' 的 'list' 参数需要列表类型 但输入参数类型为 ''"
+warning.config.vanilla_loot.missing_type: "在文件 发现问题 - 原版战利品 '' 缺少必需的 'type' 参数"
+warning.config.vanilla_loot.invalid_type: "在文件 发现问题 - 原版战利品 '' 使用了无效类型 '' 允许的类型: []"
+warning.config.vanilla_loot.block.invalid_target: "在文件 发现问题 - 原版战利品 '' 中存在无效的方块目标 ''"
+warning.config.sound.duplicate: "在文件 发现问题 - 重复的音效 '' 请检查其他文件中是否存在相同配置"
+warning.config.sound.missing_sounds: "在文件 发现问题 - 音效 '' 缺少必需的 'sounds' 参数"
+warning.config.sound.missing_name: "在文件 发现问题 - 音效 '' 缺少必需的 'name' 参数"
+warning.config.jukebox_song.duplicate: "在文件 发现问题 - 重复的唱片机歌曲 '' 请检查其他文件中是否存在相同配置"
+warning.config.jukebox_song.missing_sound: "在文件 发现问题 - 唱片机歌曲 '' 缺少必需的 'sound' 参数"
+warning.config.furniture.duplicate: "在文件 发现问题 - 重复的家具 '' 请检查其他文件中是否存在相同配置"
+warning.config.furniture.missing_placement: "在文件 发现问题 - 家具 '' 缺少必需的 'placement' 参数"
+warning.config.furniture.element.missing_item: "在文件 发现问题 - 家具 '' 的某个元素缺少必需的 'item' 参数"
+warning.config.furniture.settings.unknown: "在文件 发现问题 - 家具 '' 使用了未知的设置类型 ''"
+warning.config.furniture.hitbox.invalid_type: "在文件 发现问题 - 家具 '' 使用了无效的碰撞箱类型 ''"
+warning.config.furniture.hitbox.custom.invalid_entity: "在文件 发现问题 - 家具 '' 的自定义碰撞箱使用了无效的实体类型 ''"
+warning.config.item.duplicate: "在文件 发现问题 - 重复的物品 '' 请检查其他文件中是否存在相同配置"
+warning.config.item.settings.unknown: "在文件 发现问题 - 物品 '' 使用了未知的设置类型 ''"
+warning.config.item.missing_material: "在文件 发现问题 - 物品 '' 缺少必需的 'material' 参数"
+warning.config.item.invalid_material: "在文件 发现问题 - 物品 '' 使用了无效的材料类型 ''"
+warning.config.item.bad_custom_model_data: "在文件 发现问题 - 物品 '' 使用的自定义模型数据 '' 数值过大 建议使用小于 16,777,216 的值"
+warning.config.item.custom_model_data_conflict: "在文件 发现问题 - 物品 '' 使用的自定义模型数据 '' 已被物品 '' 占用"
+warning.config.item.missing_model_id: "在文件 发现问题 - 物品 '' 缺少必需的 'custom-model-data' 或 'item-model' 参数"
+warning.config.item.behavior.missing_type: "在文件 发现问题 - 物品 '' 的行为配置缺少必需的 'type' 参数"
+warning.config.item.behavior.invalid_type: "在文件 发现问题 - 物品 '' 使用了无效的行为类型 ''"
+warning.config.item.behavior.block.missing_block: "在文件 发现问题 - 物品 '' 的 'block_item' 行为缺少必需的 'block' 参数"
+warning.config.item.behavior.furniture.missing_furniture: "在文件 发现问题 - 物品 '' 的 'furniture_item' 行为缺少必需的 'furniture' 参数"
+warning.config.item.behavior.liquid_collision.missing_block: "在文件 发现问题 - 物品 '' 的 'liquid_collision_block_item' 行为缺少必需的 'block' 参数"
+warning.config.item.model.invalid_type: "在文件 发现问题 - 物品 '' 使用了无效的模型类型 ''"
+warning.config.item.model.tint.missing_type: "在文件 发现问题 - 物品 '' 的染色配置缺少必需的 'type' 参数"
+warning.config.item.model.tint.invalid_type: "在文件 发现问题 - 物品 '' 使用了无效的染色类型 ''"
+warning.config.item.model.tint.constant.missing_value: "在文件 发现问题 - 物品 '' 的固定染色配置缺少必需的 'value' 参数"
+warning.config.item.model.tint.grass.invalid_temp: "在文件 发现问题 - 物品 '' 的草地染色使用了无效的温度值 '' 有效范围应为 0 至 1"
+warning.config.item.model.tint.grass.invalid_downfall: "在文件 发现问题 - 物品 '' 的草地染色使用了无效的降水值 '' 有效范围应为 0 至 1"
+warning.config.item.model.tint.invalid_value: "在文件 发现问题 - 物品 '' 使用了无效的染色值 ''"
+warning.config.item.model.base.missing_path: "在文件 发现问题 - 物品 '' 的 'minecraft:model' 模型缺少必需的 'path' 参数"
+warning.config.item.model.base.invalid_path: "在文件 发现问题 - 物品 '' 的 'minecraft:model' 模型路径 '' 包含非法字符 请参考 https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
+warning.config.item.model.condition.missing_property: "在文件 发现问题 - 物品 '' 的 'minecraft:condition' 模型缺少必需的 'property' 参数"
+warning.config.item.model.condition.invalid_property: "在文件 发现问题 - 物品 '' 的 'minecraft:condition' 模型使用了无效属性 ''"
+warning.config.item.model.condition.missing_on_true: "在文件 发现问题 - 物品 '' 的 'minecraft:condition' 模型缺少必需的 'on-true' 参数"
+warning.config.item.model.condition.missing_on_false: "在文件 发现问题 - 物品 '' 的 'minecraft:condition' 模型缺少必需的 'on-false' 参数"
+warning.config.item.model.condition.keybind.missing: "在文件 发现问题 - 物品 '' 的 'minecraft:keybind_down' 属性缺少必需的 'keybind' 参数"
+warning.config.item.model.condition.has_component.missing_component: "在文件 发现问题 - 物品 '' 的 'minecraft:has_component' 属性缺少必需的 'component' 参数"
+warning.config.item.model.composite.missing_models: "在文件 发现问题 - 物品 '' 的 'minecraft:composite' 模型缺少必需的 'models' 参数"
+warning.config.item.model.range_dispatch.missing_property: "在文件 发现问题 - 物品 '' 的 'minecraft:range_dispatch' 模型缺少必需的 'property' 参数"
+warning.config.item.model.range_dispatch.invalid_property: "在文件 发现问题 - 物品 '' 的 'minecraft:range_dispatch' 模型使用了无效属性 ''"
+warning.config.item.model.range_dispatch.missing_entries: "在文件 发现问题 - 物品 '' 的 'minecraft:composite' 模型缺少必需的 'entries' 参数"
+warning.config.item.model.range_dispatch.entry.missing_model: "在文件 发现问题 - 物品 '' 的 'minecraft:composite' 模型的某个条目缺少必需的 'model' 参数"
+warning.config.item.model.range_dispatch.compass.missing_target: "在文件 发现问题 - 物品 '' 的 'minecraft:compass' 属性缺少必需的 'target' 参数"
+warning.config.item.model.range_dispatch.time.missing_source: "在文件 发现问题 - 物品 '' 的 'minecraft:time' 属性缺少必需的 'source' 参数"
+warning.config.item.model.select.missing_property: "在文件 发现问题 - 物品 '' 的 'minecraft:select' 模型缺少必需的 'property' 参数"
+warning.config.item.model.select.invalid_property: "在文件 发现问题 - 物品 '' 的 'minecraft:select' 模型使用了无效属性 ''"
+warning.config.item.model.select.missing_cases: "在文件 发现问题 - 物品 '' 的 'minecraft:select' 模型缺少必需的 'cases' 参数"
+warning.config.item.model.select.case.missing_when: "在文件 发现问题 - 物品 '' 的 'minecraft:select' 模型的某个 case 缺少必需的 'when' 参数"
+warning.config.item.model.select.case.missing_model: "在文件 发现问题 - 物品 '' 的 'minecraft:select' 模型的某个 case 缺少必需的 'model' 参数"
+warning.config.item.model.select.block_state.missing_property: "在文件 发现问题 - 物品 '' 的 'minecraft:block_state' 属性缺少必需的 'block-state-property' 参数"
+warning.config.item.model.select.local_time.missing_pattern: "在文件 发现问题 - 物品 '' 的 'minecraft:local_time' 属性缺少必需的 'pattern' 参数"
+warning.config.item.model.special.missing_type: "在文件 发现问题 - 物品 '' 的 'minecraft:special' 模型缺少必需的 'type' 参数"
+warning.config.item.model.special.invalid_type: "在文件 发现问题 - 物品 '' 的 'minecraft:special' 模型使用了无效类型 ''"
+warning.config.item.model.special.banner.missing_color: "在文件 发现问题 - 物品 '' 的 'minecraft:banner' 特殊模型缺少必需的 'color' 参数"
+warning.config.item.model.special.bed.missing_texture: "在文件 发现问题 - 物品 '' 的 'minecraft:bed' 特殊模型缺少必需的 'texture' 参数"
+warning.config.item.model.special.sign.missing_wood_type: "在文件 发现问题 - 物品 '' 的 'minecraft:hanging_sign'/'minecraft:standing_sign' 特殊模型缺少必需的 'wood-type' 参数"
+warning.config.item.model.special.sign.missing_texture: "在文件 发现问题 - 物品 '' 的 'minecraft:hanging_sign'/'minecraft:standing_sign' 特殊模型缺少必需的 'texture' 参数"
+warning.config.item.model.special.chest.missing_texture: "在文件 发现问题 - 物品 '' 的 'minecraft:chest' 特殊模型缺少必需的 'texture' 参数"
+warning.config.item.model.special.chest.invalid_openness: "在文件 发现问题 - 物品 '' 的 'minecraft:chest' 特殊模型使用了无效的 'openness' 值 '' 有效范围应为 0~1"
+warning.config.item.model.special.shulker_box.missing_texture: "在文件 发现问题 - 物品 '' 的 'minecraft:shulker_box' 特殊模型缺少必需的 'texture' 参数"
+warning.config.item.model.special.shulker_box.invalid_openness: "在文件 发现问题 - 物品 '' 的 'minecraft:shulker_box' 特殊模型使用了无效的 'openness' 值 '' 有效范围应为 0~1"
+warning.config.item.model.special.head.missing_kind: "在文件 发现问题 - 物品 '' 的 'minecraft:head' 特殊模型缺少必需的 'kind' 参数"
+warning.config.item.model.special.head.missing_texture: "在文件 发现问题 - 物品 '' 的 'minecraft:head' 特殊模型缺少必需的 'texture' 参数"
+warning.config.block.duplicate: "在文件 发现问题 - 重复的方块 '' 请检查其他文件中是否存在相同配置"
+warning.config.block.missing_state: "在文件 发现问题 - 方块 '' 缺少必需的 'state' 参数"
+warning.config.block.state.property.missing_type: "在文件 发现问题 - 方块 '' 的属性 '' 缺少必需的 'type' 参数"
+warning.config.block.state.property.invalid_type: "在文件 发现问题 - 方块 '' 的属性 '' 使用了无效的类型参数 ''"
+warning.config.block.state.property.integer.invalid_range: "在文件 发现问题 - 方块 '' 的整数属性 '' 使用了无效的范围参数 '' 正确语法: 1~2"
+warning.config.block.state.property.invalid_format: "在文件 发现问题 - 方块 '' 使用了无效的方块状态属性格式 ''."
+warning.config.block.state.missing_real_id: "在文件 发现问题 - 方块 '' 的 'state' 缺少必需的 'id' 参数 该 ID 是服务端方块 ID 用于唯一标识每种方块状态类型"
+warning.config.block.state.missing_state: "在文件 发现问题 - 方块 '' 的 'state' 缺少必需的 'state' 参数"
+warning.config.block.state.missing_properties: "在文件 发现问题 - 方块 '' 的 'states' 缺少必需的 'properties' 段落"
+warning.config.block.state.missing_appearances: "在文件 发现问题 - 方块 '' 的 'states' 缺少必需的 'appearances' 段落"
+warning.config.block.state.missing_variants: "在文件 发现问题 - 方块 '' 的 'states' 缺少必需的 'variants' 段落"
+warning.config.block.state.variant.missing_appearance: "在文件 发现问题 - 方块 '' 的变体 '' 缺少必需的 'appearance' 参数"
+warning.config.block.state.variant.invalid_appearance: "在文件 发现问题 - 方块 '' 的变体 '' 使用了不存在的 appearance ''"
+warning.config.block.state.invalid_vanilla: "在文件 发现问题 - 方块 '' 使用了无效的原版方块状态 ''"
+warning.config.block.state.unavailable_vanilla: "在文件 发现问题 - 方块 '' 使用了不可用的原版方块状态 '' 请在 mappings.yml 中释放该状态"
+warning.config.block.state.invalid_vanilla_id: "在文件 发现问题 - 方块 '' 使用的原版方块状态 '' 超出可用槽位范围 '0~'"
+warning.config.block.state.conflict: "在文件 发现问题 - 方块 '' 使用的原版方块状态 '' 已被 '' 占用"
+warning.config.block.state.bind_failed: "在文件 发现问题 - 方块 '' 无法为 '' 绑定真实方块状态 因该状态已被 '' 占用"
+warning.config.block.state.missing_model: "在文件 发现问题 - 方块 '' 缺少必需的 'model' 或 'models' 参数"
+warning.config.block.state.invalid_real_id: "在文件 发现问题 - 方块 '' 使用的真实方块状态 '' 超出可用槽位范围 '0~' 如果槽位已用尽 请在 additional-real-blocks.yml 中添加更多真实状态"
+warning.config.block.state.model.missing_path: "在文件 发现问题 - 方块 '' 的 'model' 缺少必需的 'path' 选项"
+warning.config.block.state.model.invalid_path: "在文件 发现问题 - 方块 '' 的 'path' 参数 '' 包含非法字符 请参考 https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
+warning.config.block.settings.unknown: "在文件 发现问题 - 方块 '' 使用了未知的设置类型 ''"
+warning.config.block.behavior.missing_type: "在文件 发现问题 - 方块 '' 的行为配置缺少必需的 'type' 参数"
+warning.config.block.behavior.invalid_type: "在文件 发现问题 - 方块 '' 使用了无效的行为类型 ''"
+warning.config.block.behavior.concrete.missing_solid: "在文件 发现问题 - 方块 '' 的 'concrete_block' 行为缺少必需的 'solid-block' 选项"
+warning.config.block.behavior.crop.missing_age: "在文件 发现问题 - 方块 '' 的 'crop_block' 行为缺少必需的 'age' 属性"
+warning.config.block.behavior.sugar_cane.missing_age: "在文件 发现问题 - 方块 '' 的 'sugar_cane_block' 行为缺少必需的 'age' 属性"
+warning.config.block.behavior.leaves.missing_persistent: "在文件 发现问题 - 方块 '' 的 'leaves_block' 行为缺少必需的 'persistent' 属性"
+warning.config.block.behavior.leaves.missing_distance: "在文件 发现问题 - 方块 '' 的 'leaves_block' 行为缺少必需的 'distance' 属性"
+warning.config.block.behavior.sapling.missing_stage: "在文件 发现问题 - 方块 '' 的 'sapling_block' 行为缺少必需的 'stage' 属性"
+warning.config.block.behavior.sapling.missing_feature: "在文件 发现问题 - 方块 '' 的 'sapling_block' 行为缺少必需的 'feature' 参数"
+warning.config.block.behavior.strippable.missing_stripped: "在文件 发现问题 - 方块 '' 的 'strippable_block' 行为缺少必需的 'stripped' 参数"
+warning.config.model.generation.missing_parent: "在文件 发现问题 - 配置项 '' 的 'generation' 段落缺少必需的 'parent' 参数"
+warning.config.model.generation.conflict: "在文件 发现问题 - 无法为 '' 生成模型 存在多个配置尝试使用相同路径 '' 生成不同的 JSON 模型"
+warning.config.model.generation.texture.invalid: "在文件 发现问题 - 配置项 '' 的纹理 '' 路径 '' 包含非法字符 请参考 https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
+warning.config.model.generation.parent.invalid: "在文件 发现问题 - 配置项 '' 的父级参数 '' 包含非法字符 请参考 https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
+warning.config.emoji.missing_keywords: "在文件 发现问题 - 表情 '' 缺少必需的 'keywords' 参数"
+warning.config.emoji.duplicate: "在文件 发现问题 - 重复的表情 '' 请检查其他文件中是否存在相同配置"
+warning.config.emoji.invalid_image: "在文件 发现问题 - 表情 '' 的 'image' 参数 '' 无效"
+warning.config.advancement.duplicate: "在文件 发现问题 - 重复的进度 '' 请检查其他文件中是否存在相同配置"
+warning.config.loot_table.missing_pools: "在文件 发现问题 - '' 的战利品表配置错误 缺少必需的 'pools' 参数"
+warning.config.loot_table.invalid_pools_type: "在文件 发现问题 - '' 的战利品表配置错误 'pools' 应为字符串/映射列表 当前类型: ''"
+warning.config.loot_table.invalid_conditions_type: "在文件 发现问题 - '' 的战利品表配置错误 'conditions' 应为映射列表 当前类型: ''"
+warning.config.loot_table.invalid_functions_type: "在文件 发现问题 - '' 的战利品表配置错误 'functions' 应为映射列表 当前类型: ''"
+warning.config.loot_table.invalid_entries_type: "在文件 发现问题 - '' 的战利品表配置错误 'entries' 应为映射列表 当前类型: ''"
+warning.config.loot_table.function.missing_type: "在文件 发现问题 - '' 的战利品表配置错误 某个函数缺少必需的 'type' 参数"
+warning.config.loot_table.function.invalid_type: "在文件 发现问题 - '' 的战利品表配置错误 某个函数使用了无效的函数类型 ''"
+warning.config.loot_table.function.apply_bonus.missing_enchantment: "在文件 发现问题 - '' 的战利品表配置错误 'apply_bonus' 函数缺少必需的 'enchantment' 参数"
+warning.config.loot_table.function.apply_bonus.missing_formula: "在文件 发现问题 - '' 的战利品表配置错误 'apply_bonus' 函数缺少必需的 'formula' 参数"
+warning.config.loot_table.function.drop_exp.missing_count: "在文件 发现问题 - '' 的战利品表配置错误 'drop_exp' 函数缺少必需的 'count' 参数"
+warning.config.loot_table.function.set_count.missing_count: "在文件 发现问题 - '' 的战利品表配置错误 'set_count' 函数缺少必需的 'count' 参数"
+warning.config.loot_table.entry.missing_type: "在文件 发现问题 - '' 的战利品表配置错误 某个条目缺少必需的 'type' 参数"
+warning.config.loot_table.entry.invalid_type: "在文件 发现问题 - '' 的战利品表配置错误 某个条目使用了无效的条目类型 ''"
+warning.config.loot_table.entry.exp.missing_count: "在文件 发现问题 - '' 的战利品表配置错误 'exp' 条目缺少必需的 'count' 参数"
+warning.config.loot_table.entry.item.missing_item: "在文件 发现问题 - '' 的战利品表配置错误 'item' 条目缺少必需的 'item' 参数"
+warning.config.loot_table.condition.missing_type: "在文件 发现问题 - '' 的战利品表配置错误 某个条件缺少必需的 'type' 参数"
+warning.config.loot_table.condition.invalid_type: "在文件 发现问题 - '' 的战利品表配置错误 某个条件使用了无效的条件类型 ''"
+warning.config.loot_table.condition.table_bonus.missing_enchantment: "在文件 发现问题 - '' 的战利品表配置错误 'table_bonus' 条件缺少必需的 'enchantment' 参数"
+warning.config.loot_table.condition.table_bonus.missing_chances: "在文件 发现问题 - '' 的战利品表配置错误 'table_bonus' 条件缺少必需的 'chances' 参数"
+warning.config.loot_table.number.missing_type: "在文件 发现问题 - '' 的战利品表配置错误 某个数值缺少必需的 'type' 参数"
+warning.config.loot_table.number.invalid_type: "在文件 发现问题 - '' 的战利品表配置错误 某个数值使用了无效的数值类型 ''"
+warning.config.host.missing_type: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - 缺少必需的 'type' 参数"
+warning.config.host.invalid_type: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - 无效的托管类型 '' 请参考 https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine/plugin-wiki/craftengine/resource-pack/host"
+warning.config.host.external.missing_url: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - 外部托管缺少必需的 'url' 参数"
+warning.config.host.alist.missing_api_url: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - Alist 托管缺少必需的 'api-url' 参数"
+warning.config.host.alist.missing_username: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - Alist 托管缺少必需的 'username' 参数或环境变量 'CE_ALIST_USERNAME'"
+warning.config.host.alist.missing_password: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - Alist 托管缺少必需的 'password' 参数或环境变量 'CE_ALIST_PASSWORD'"
+warning.config.host.alist.missing_upload_path: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - Alist 托管缺少必需的 'upload-path' 参数"
+warning.config.host.dropbox.missing_app_key: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - Dropbox 托管缺少必需的 'app-key' 参数或环境变量 'CE_DROPBOX_APP_KEY'"
+warning.config.host.dropbox.missing_app_secret: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - Dropbox 托管缺少必需的 'app-secret' 参数或环境变量 'CE_DROPBOX_APP_SECRET'"
+warning.config.host.dropbox.missing_refresh_token: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - Dropbox 托管缺少必需的 'refresh-token' 参数或环境变量 'CE_DROPBOX_REFRESH_TOKEN'"
+warning.config.host.dropbox.missing_upload_path: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - Dropbox 托管缺少必需的 'upload-path' 参数"
+warning.config.host.lobfile.missing_api_key: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - Lobfile 托管缺少必需的 'api-key' 参数"
+warning.config.host.onedrive.missing_client_id: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - OneDrive 托管缺少必需的 'client-id' 参数或环境变量 'CE_ONEDRIVE_CLIENT_ID'"
+warning.config.host.onedrive.missing_client_secret: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - OneDrive 托管缺少必需的 'client-secret' 参数或环境变量 'CE_ONEDRIVE_CLIENT_SECRET'"
+warning.config.host.onedrive.missing_refresh_token: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - OneDrive 托管缺少必需的 'refresh-token' 参数或环境变量 'CE_ONEDRIVE_REFRESH_TOKEN'"
+warning.config.host.onedrive.missing_upload_path: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - OneDrive 托管缺少必需的 'upload-path' 参数"
+warning.config.host.s3.missing_endpoint: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - S3 托管缺少必需的 'endpoint' 参数"
+warning.config.host.s3.missing_bucket: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - S3 托管缺少必需的 'bucket' 参数"
+warning.config.host.s3.missing_access_key: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - S3 托管缺少必需的 'access-key-id' 参数或环境变量 'CE_S3_ACCESS_KEY_ID'"
+warning.config.host.s3.missing_secret: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - S3 托管缺少必需的 'access-key-secret' 参数或环境变量 'CE_S3_ACCESS_KEY_SECRET'"
+warning.config.host.s3.missing_upload_path: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - S3 托管缺少必需的 'upload-path' 参数"
+warning.config.host.self.missing_ip: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - 自托管托管缺少必需的 'ip' 参数"
+warning.config.host.self.invalid_port: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - 自托管托管的端口 '' 无效"
+warning.config.host.gitlab.missing_url: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - GitLab 托管缺少必需的 'gitlab-url' 参数"
+warning.config.host.gitlab.missing_token: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - GitLab 托管缺少必需的 'access-token' 参数"
+warning.config.host.gitlab.missing_project: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - GitLab 托管缺少必需的 'project-id' 参数"
+warning.config.host.proxy.missing_host: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - 代理配置缺少必需的 'host' 参数"
+warning.config.host.proxy.missing_port: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - 代理配置缺少必需的 'port' 参数"
+warning.config.host.proxy.missing_scheme: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - 代理配置缺少必需的 'scheme' 参数"
+warning.config.host.proxy.invalid: "在 config.yml 的 'resource-pack.delivery.hosting' 处发现问题 - 无效的代理配置 ''"
+warning.config.conflict_matcher.missing_type: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件冲突处理器的某个匹配器缺少必需的 'type' 参数"
+warning.config.conflict_matcher.invalid_type: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件冲突处理器的某个匹配器使用了无效类型 ''"
+warning.config.conflict_matcher.exact.missing_path: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 精确路径匹配器缺少必需的 'path' 参数"
+warning.config.conflict_matcher.contains.missing_path: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 路径包含匹配器缺少必需的 'path' 参数"
+warning.config.conflict_matcher.filename.missing_name: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件名匹配器缺少必需的 'path' 参数"
+warning.config.conflict_matcher.pattern.missing_pattern: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 正则表达式匹配器缺少必需的 'pattern' 参数"
+warning.config.conflict_matcher.parent_prefix.missing_prefix: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 父路径前缀匹配器缺少必需的 'prefix' 参数"
+warning.config.conflict_matcher.parent_suffix.missing_suffix: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 父路径后缀匹配器缺少必需的 'suffix' 参数"
+warning.config.conflict_matcher.inverted.missing_term: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 反向匹配器缺少必需的 'term' 参数"
+warning.config.conflict_matcher.all_of.missing_terms: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 全匹配器缺少必需的 'terms' 参数"
+warning.config.conflict_matcher.any_of.missing_terms: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 任一匹配器缺少必需的 'terms' 参数"
+warning.config.conflict_resolution.missing_type: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件冲突处理器的某个解决方案缺少必需的 'type' 参数"
+warning.config.conflict_resolution.invalid_type: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件冲突处理器的某个解决方案使用了无效类型 ''"
\ No newline at end of file
diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/advancement/BukkitAdvancementManager.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/advancement/BukkitAdvancementManager.java
index c1ed78270..74e2a5916 100644
--- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/advancement/BukkitAdvancementManager.java
+++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/advancement/BukkitAdvancementManager.java
@@ -7,7 +7,7 @@ import net.momirealms.craftengine.core.advancement.AbstractAdvancementManager;
import net.momirealms.craftengine.core.pack.LoadingSequence;
import net.momirealms.craftengine.core.pack.Pack;
import net.momirealms.craftengine.core.plugin.config.ConfigSectionParser;
-import net.momirealms.craftengine.core.plugin.locale.TranslationManager;
+import net.momirealms.craftengine.core.plugin.locale.LocalizedResourceConfigException;
import net.momirealms.craftengine.core.util.GsonHelper;
import net.momirealms.craftengine.core.util.Key;
@@ -51,8 +51,7 @@ public class BukkitAdvancementManager extends AbstractAdvancementManager {
@Override
public void parseSection(Pack pack, Path path, Key id, Map section) {
if (advancements.containsKey(id)) {
- TranslationManager.instance().log("warning.config.advancement.duplicated", path.toString(), id.toString());
- return;
+ throw new LocalizedResourceConfigException("warning.config.advancement.duplicate", path, id);
}
JsonElement jsonTree = GsonHelper.get().toJsonTree(section);
FastNMS.INSTANCE.registerAdvancement(id.decompose(), jsonTree);
diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BukkitBlockManager.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BukkitBlockManager.java
index 807b57514..74e9e5019 100644
--- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BukkitBlockManager.java
+++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BukkitBlockManager.java
@@ -26,6 +26,7 @@ import net.momirealms.craftengine.core.pack.model.generation.ModelGeneration;
import net.momirealms.craftengine.core.plugin.CraftEngine;
import net.momirealms.craftengine.core.plugin.config.Config;
import net.momirealms.craftengine.core.plugin.config.ConfigSectionParser;
+import net.momirealms.craftengine.core.plugin.locale.LocalizedResourceConfigException;
import net.momirealms.craftengine.core.plugin.locale.TranslationManager;
import net.momirealms.craftengine.core.registry.BuiltInRegistries;
import net.momirealms.craftengine.core.registry.Holder;
@@ -139,8 +140,8 @@ public class BukkitBlockManager extends AbstractBlockManager {
this.appearanceToRealState.clear();
this.blockStateOverrides.clear();
this.modBlockStates.clear();
- if (EmptyBlock.INSTANCE != null)
- Arrays.fill(this.stateId2ImmutableBlockStates, EmptyBlock.INSTANCE.defaultState());
+ if (EmptyBlock.STATE != null)
+ Arrays.fill(this.stateId2ImmutableBlockStates, EmptyBlock.STATE);
}
@Override
@@ -168,7 +169,6 @@ public class BukkitBlockManager extends AbstractBlockManager {
this.tempVanillaBlockStateModels.clear();
}
-
@Nullable
public Object getMinecraftBlockHolder(int stateId) {
return stateId2BlockHolder.get(stateId);
@@ -308,7 +308,7 @@ public class BukkitBlockManager extends AbstractBlockManager {
}
}
- this.soundMapper = soundMapperBuilder.build();
+ this.soundMapper = soundMapperBuilder.buildKeepingLast();
} catch (Throwable e) {
plugin.logger().warn("Failed to inject blocks.", e);
}
@@ -331,77 +331,68 @@ public class BukkitBlockManager extends AbstractBlockManager {
public void parseSection(Pack pack, Path path, Key id, Map section) {
// check duplicated config
if (byId.containsKey(id)) {
- TranslationManager.instance().log("warning.config.block.duplicated", path.toString(), id.toString());
- return;
+ throw new LocalizedResourceConfigException("warning.config.block.duplicate");
}
// read block settings
BlockSettings settings = BlockSettings.fromMap(MiscUtils.castToMap(section.getOrDefault("settings", Map.of()), false));
+
// read loot table
LootTable lootTable = LootTable.fromMap(MiscUtils.castToMap(section.getOrDefault("loot", Map.of()), false));
+
// read states
Map> properties;
Map appearances;
Map variants;
- Map stateSection = MiscUtils.castToMap(section.get("state"), true);
- if (stateSection != null) {
+ Object stateObj = ResourceConfigUtils.requireNonNullOrThrow(ResourceConfigUtils.get(section, "state", "states"), "warning.config.block.missing_state");
+ Map stateSection = MiscUtils.castToMap(stateObj, true);
+
+ // single state
+ if (!stateSection.containsKey("properties")) {
properties = Map.of();
- int internalId = MiscUtils.getAsInt(stateSection.getOrDefault("id", -1));
+ int internalId = ResourceConfigUtils.getAsInt(stateSection.getOrDefault("id", -1), "id");
if (internalId < 0) {
- TranslationManager.instance().log("warning.config.block.state.lack_real_id", path.toString(), id.toString());
- return;
+ throw new LocalizedResourceConfigException("warning.config.block.state.missing_real_id");
}
- Pair pair = parseAppearanceSection(pack, path, id, stateSection);
+ Pair pair = parseAppearanceSection(id, stateSection);
if (pair == null) return;
appearances = Map.of("default", pair.right());
- Key internalBlockId = Key.of(CraftEngine.NAMESPACE, pair.left().value() + "_" + internalId);
- int internalBlockRegistryId = MiscUtils.getAsInt(internalId2StateId.getOrDefault(internalBlockId, -1));
+ String internalBlock = pair.left().value() + "_" + internalId;
+ Key internalBlockId = Key.of(CraftEngine.NAMESPACE, internalBlock);
+ int internalBlockRegistryId = Optional.ofNullable(internalId2StateId.get(internalBlockId)).orElse(-1);
if (internalBlockRegistryId == -1) {
- TranslationManager.instance().log("warning.config.block.state.invalid_real_state_id",
- path.toString(),
- id.toString(),
- pair.left().value() + "_" + internalId,
- String.valueOf(MiscUtils.getAsInt(registeredRealBlockSlots.get(pair.left()))-1)
- );
- return;
+ throw new LocalizedResourceConfigException("warning.config.block.state.invalid_real_id",
+ internalBlock,
+ String.valueOf(registeredRealBlockSlots.get(pair.left()) - 1));
}
variants = Map.of("", new VariantState("default", settings, internalBlockRegistryId));
} else {
- // states
- Map statesSection = MiscUtils.castToMap(section.get("states"), true);
- if (statesSection == null) {
- TranslationManager.instance().log("warning.config.block.lack_state", path.toString(), id.toString());
- return;
- }
// properties
- Map propertySection = MiscUtils.castToMap(statesSection.get("properties"), true);
+ Map propertySection = MiscUtils.castToMap(stateSection.get("properties"), true);
if (propertySection == null) {
- TranslationManager.instance().log("warning.config.block.state.lack_properties", path.toString(), id.toString());
- return;
+ throw new LocalizedResourceConfigException("warning.config.block.state.missing_properties");
}
- properties = parseProperties(path, id, propertySection);
+ properties = parseProperties(propertySection);
// appearance
- Map appearancesSection = MiscUtils.castToMap(statesSection.get("appearances"), true);
+ Map appearancesSection = MiscUtils.castToMap(stateSection.get("appearances"), true);
if (appearancesSection == null) {
- TranslationManager.instance().log("warning.config.block.state.lack_appearances", path.toString(), id.toString());
- return;
+ throw new LocalizedResourceConfigException("warning.config.block.state.missing_appearances");
}
appearances = new HashMap<>();
Map tempTypeMap = new HashMap<>();
for (Map.Entry appearanceEntry : appearancesSection.entrySet()) {
if (appearanceEntry.getValue() instanceof Map, ?> appearanceSection) {
- Pair pair = parseAppearanceSection(pack, path, id, MiscUtils.castToMap(appearanceSection, false));
+ Pair pair = parseAppearanceSection(id, MiscUtils.castToMap(appearanceSection, false));
if (pair == null) return;
appearances.put(appearanceEntry.getKey(), pair.right());
tempTypeMap.put(appearanceEntry.getKey(), pair.left());
}
}
// variants
- Map variantsSection = MiscUtils.castToMap(statesSection.get("variants"), true);
+ Map variantsSection = MiscUtils.castToMap(stateSection.get("variants"), true);
if (variantsSection == null) {
- TranslationManager.instance().log("warning.config.block.state.lack_variants", path.toString(), id.toString());
- return;
+ throw new LocalizedResourceConfigException("warning.config.block.state.missing_variants");
}
variants = new HashMap<>();
for (Map.Entry variantEntry : variantsSection.entrySet()) {
@@ -410,25 +401,19 @@ public class BukkitBlockManager extends AbstractBlockManager {
String variantName = variantEntry.getKey();
String appearance = (String) variantSection.get("appearance");
if (appearance == null) {
- TranslationManager.instance().log("warning.config.block.state.variant.lack_appearance", path.toString(), id.toString(), variantName);
- return;
+ throw new LocalizedResourceConfigException("warning.config.block.state.variant.missing_appearance", variantName);
}
if (!appearances.containsKey(appearance)) {
- TranslationManager.instance().log("warning.config.block.state.variant.invalid_appearance", path.toString(), id.toString(), variantName, appearance);
- return;
+ throw new LocalizedResourceConfigException("warning.config.block.state.variant.invalid_appearance", variantName, appearance);
}
- int internalId = MiscUtils.getAsInt(variantSection.getOrDefault("id", -1));
+ int internalId = ResourceConfigUtils.getAsInt(variantSection.getOrDefault("id", -1), "id");
Key baseBlock = tempTypeMap.get(appearance);
Key internalBlockId = Key.of(CraftEngine.NAMESPACE, baseBlock.value() + "_" + internalId);
- int internalBlockRegistryId = MiscUtils.getAsInt(internalId2StateId.getOrDefault(internalBlockId, -1));
+ int internalBlockRegistryId = Optional.ofNullable(internalId2StateId.get(internalBlockId)).orElse(-1);
if (internalBlockRegistryId == -1) {
- TranslationManager.instance().log("warning.config.block.state.invalid_real_state_id",
- path.toString(),
- id.toString(),
+ throw new LocalizedResourceConfigException("warning.config.block.state.invalid_real_id",
internalBlockId.toString(),
- String.valueOf(MiscUtils.getAsInt(registeredRealBlockSlots.getOrDefault(baseBlock, 1)) - 1)
- );
- return;
+ String.valueOf(registeredRealBlockSlots.getOrDefault(baseBlock, 1) - 1));
}
Map anotherSetting = MiscUtils.castToMap(variantSection.get("settings"), true);
variants.put(variantName, new VariantState(appearance, anotherSetting == null ? settings : BlockSettings.ofFullCopy(settings, anotherSetting), internalBlockRegistryId));
@@ -436,18 +421,21 @@ public class BukkitBlockManager extends AbstractBlockManager {
}
}
- // create or get block holder
- Holder.Reference holder = BuiltInRegistries.BLOCK.get(id).orElseGet(() ->
- ((WritableRegistry) BuiltInRegistries.BLOCK).registerForHolder(new ResourceKey<>(BuiltInRegistries.BLOCK.key().location(), id)));
- // create block
- Map behaviorSection = MiscUtils.castToMap(section.getOrDefault("behavior", Map.of()), false);
- BukkitCustomBlock block = new BukkitCustomBlock(id, holder, properties, appearances, variants, settings, behaviorSection, lootTable);
+ Map behaviors = MiscUtils.castToMap(section.getOrDefault("behavior", Map.of()), false);
+ CustomBlock block = BukkitCustomBlock.builder(id)
+ .appearances(appearances)
+ .variantMapper(variants)
+ .lootTable(lootTable)
+ .properties(properties)
+ .settings(settings)
+ .behavior(behaviors)
+ .build();
// bind appearance and real state
for (ImmutableBlockState state : block.variantProvider().states()) {
ImmutableBlockState previous = stateId2ImmutableBlockStates[state.customBlockState().registryId() - BlockStateUtils.vanillaStateSize()];
if (previous != null && !previous.isEmpty()) {
- TranslationManager.instance().log("warning.config.block.state.bind_real_state", path.toString(), id.toString(), state.toString(), previous.toString());
+ TranslationManager.instance().log("warning.config.block.state.bind_failed", path.toString(), id.toString(), state.toString(), previous.toString());
continue;
}
stateId2ImmutableBlockStates[state.customBlockState().registryId() - BlockStateUtils.vanillaStateSize()] = state;
@@ -456,6 +444,7 @@ public class BukkitBlockManager extends AbstractBlockManager {
}
byId.put(id, block);
+
// generate mod assets
if (Config.generateModAssets()) {
for (ImmutableBlockState state : block.variantProvider().states()) {
@@ -466,67 +455,48 @@ public class BukkitBlockManager extends AbstractBlockManager {
}
}
- private Map> parseProperties(Path path, Key id, Map propertiesSection) {
+ private Map> parseProperties(Map propertiesSection) {
Map> properties = new HashMap<>();
for (Map.Entry entry : propertiesSection.entrySet()) {
- if (entry.getValue() instanceof Map, ?> params) {
- try {
- Property> property = Properties.fromMap(entry.getKey(), MiscUtils.castToMap(params, false));
- properties.put(entry.getKey(), property);
- } catch (Exception e) {
- TranslationManager.instance().log("warning.config.block.state.invalid_property", path.toString(), id.toString(), entry.getKey(), e.getMessage());
- }
- } else {
- TranslationManager.instance().log("warning.config.block.state.invalid_property_structure", path.toString(), id.toString(), entry.getKey());
- }
+ Property> property = Properties.fromMap(entry.getKey(), MiscUtils.castToMap(entry.getValue(), false));
+ properties.put(entry.getKey(), property);
}
return properties;
}
@Nullable
- private Pair parseAppearanceSection(Pack pack, Path path, Key id, Map section) {
+ private Pair parseAppearanceSection(Key id, Map section) {
// require state non null
- String vanillaStateString = (String) section.get("state");
+ Object vanillaStateString = section.get("state");
if (vanillaStateString == null) {
- TranslationManager.instance().log("warning.config.block.state.lack_state", path.toString(), id.toString());
- return null;
+ throw new LocalizedResourceConfigException("warning.config.block.state.missing_state");
}
// get its registry id
- int vanillaStateRegistryId;
- VanillaStateParseResult parseResult = parseVanillaStateRegistryId(vanillaStateString);
- if (parseResult.success()) {
- vanillaStateRegistryId = parseResult.result;
- } else {
- String[] args = new String[parseResult.args.length + 2];
- args[0] = path.toString();
- args[1] = id.toString();
- System.arraycopy(parseResult.args, 0, args, 2, parseResult.args.length);
- TranslationManager.instance().log(parseResult.reason(), args);
- return null;
- }
+ int vanillaStateRegistryId = parseVanillaStateRegistryId(vanillaStateString.toString());
// check conflict
Key ifAny = this.tempRegistryIdConflictMap.get(vanillaStateRegistryId);
if (ifAny != null && !ifAny.equals(id)) {
- TranslationManager.instance().log("warning.config.block.state.conflict", path.toString(), id.toString(), BlockStateUtils.fromBlockData(BlockStateUtils.idToBlockState(vanillaStateRegistryId)).getAsString(), ifAny.toString());
- return null;
+ throw new LocalizedResourceConfigException("warning.config.block.state.conflict", BlockStateUtils.fromBlockData(BlockStateUtils.idToBlockState(vanillaStateRegistryId)).getAsString(), ifAny.toString());
}
// require models not to be null
- Object models = section.getOrDefault("models", section.get("model"));
+ Object models = section.get("models");
if (models == null) {
- TranslationManager.instance().log("warning.config.block.state.no_model_set", path.toString(), id.toString());
- return null;
+ models = section.get("model");
+ }
+ if (models == null) {
+ throw new LocalizedResourceConfigException("warning.config.block.state.missing_model");
}
List variants = new ArrayList<>();
if (models instanceof Map, ?> singleModelSection) {
- loadVariantModel(pack, path, id, variants, MiscUtils.castToMap(singleModelSection, false));
+ loadVariantModel(variants, MiscUtils.castToMap(singleModelSection, false));
} else if (models instanceof List> modelList) {
for (Object model : modelList) {
if (model instanceof Map,?> singleModelMap) {
- loadVariantModel(pack, path, id, variants, MiscUtils.castToMap(singleModelMap, false));
+ loadVariantModel(variants, MiscUtils.castToMap(singleModelMap, false));
}
}
}
@@ -551,73 +521,68 @@ public class BukkitBlockManager extends AbstractBlockManager {
return Pair.of(block, vanillaStateRegistryId);
}
- private void loadVariantModel(Pack pack, Path path, Key id, List variants, Map singleModelMap) {
+ private void loadVariantModel(List variants, Map singleModelMap) {
JsonObject json = new JsonObject();
String modelPath = (String) singleModelMap.get("path");
if (modelPath == null) {
- TranslationManager.instance().log("warning.config.block.state.model.lack_path", path.toString(), id.toString());
- return;
+ throw new LocalizedResourceConfigException("warning.config.block.state.model.missing_path");
}
if (!ResourceLocation.isValid(modelPath)) {
- TranslationManager.instance().log("warning.config.block.state.model.invalid_resource_location", path.toString(), id.toString(), modelPath);
- return;
+ throw new LocalizedResourceConfigException("warning.config.block.state.model.invalid_path", modelPath);
}
json.addProperty("model", modelPath);
- if (singleModelMap.containsKey("x")) json.addProperty("x", MiscUtils.getAsInt(singleModelMap.get("x")));
- if (singleModelMap.containsKey("y")) json.addProperty("y", MiscUtils.getAsInt(singleModelMap.get("y")));
+ if (singleModelMap.containsKey("x")) json.addProperty("x", ResourceConfigUtils.getAsInt(singleModelMap.get("x"), "x"));
+ if (singleModelMap.containsKey("y")) json.addProperty("y", ResourceConfigUtils.getAsInt(singleModelMap.get("y"), "y"));
if (singleModelMap.containsKey("uvlock")) json.addProperty("uvlock", (boolean) singleModelMap.get("uvlock"));
- if (singleModelMap.containsKey("weight")) json.addProperty("weight", MiscUtils.getAsInt(singleModelMap.get("weight")));
+ if (singleModelMap.containsKey("weight")) json.addProperty("weight", ResourceConfigUtils.getAsInt(singleModelMap.get("weight"), "weight"));
Map generationMap = MiscUtils.castToMap(singleModelMap.get("generation"), true);
if (generationMap != null) {
- prepareModelGeneration(path, id, new ModelGeneration(Key.of(modelPath), generationMap));
+ prepareModelGeneration(new ModelGeneration(Key.of(modelPath), generationMap));
}
variants.add(json);
}
- private VanillaStateParseResult parseVanillaStateRegistryId(String blockState) {
+ private int parseVanillaStateRegistryId(String blockState) {
String[] split = blockState.split(":", 3);
if (split.length >= 4) {
- return VanillaStateParseResult.failure("warning.config.block.state.invalid_state", new String[]{blockState});
+ throw new LocalizedResourceConfigException("warning.config.block.state.invalid_vanilla", blockState);
}
int registryId;
String stateOrId = split[split.length - 1];
boolean isId = !stateOrId.contains("[") && !stateOrId.contains("]");
if (isId) {
- if (split.length == 1) return VanillaStateParseResult.failure("warning.config.block.state.invalid_state", new String[]{blockState});
+ if (split.length == 1) {
+ throw new LocalizedResourceConfigException("warning.config.block.state.invalid_vanilla", blockState);
+ }
Key block = split.length == 2 ? Key.of(split[0]) : Key.of(split[0], split[1]);
try {
int id = split.length == 2 ? Integer.parseInt(split[1]) : Integer.parseInt(split[2]);
- if (id < 0) return VanillaStateParseResult.failure("warning.config.block.state.invalid_state", new String[]{blockState});
+ if (id < 0) {
+ throw new LocalizedResourceConfigException("warning.config.block.state.invalid_vanilla", blockState);
+ }
List arranger = this.blockAppearanceArranger.get(block);
- if (arranger == null) return VanillaStateParseResult.failure("warning.config.block.state.unavailable_state", new String[]{blockState});
- if (id >= arranger.size()) return VanillaStateParseResult.failure("warning.config.block.state.invalid_vanilla_state_id", new String[]{blockState, String.valueOf(arranger.size() - 1)});
+ if (arranger == null) {
+ throw new LocalizedResourceConfigException("warning.config.block.state.unavailable_vanilla", blockState);
+ }
+ if (id >= arranger.size()) {
+ throw new LocalizedResourceConfigException("warning.config.block.state.invalid_vanilla_id", blockState, String.valueOf(arranger.size() - 1));
+ }
registryId = arranger.get(id);
} catch (NumberFormatException e) {
- return VanillaStateParseResult.failure("warning.config.block.state.invalid_state", new String[]{blockState});
+ throw new LocalizedResourceConfigException("warning.config.block.state.invalid_vanilla", e, blockState);
}
} else {
try {
BlockData blockData = Bukkit.createBlockData(blockState);
registryId = BlockStateUtils.blockDataToId(blockData);
if (!this.blockAppearanceMapper.containsKey(registryId)) {
- return VanillaStateParseResult.failure("warning.config.block.state.unavailable_state", new String[]{blockState});
+ throw new LocalizedResourceConfigException("warning.config.block.state.unavailable_vanilla", blockState);
}
} catch (IllegalArgumentException e) {
- return VanillaStateParseResult.failure("warning.config.block.state.invalid_state", new String[]{blockState});
+ throw new LocalizedResourceConfigException("warning.config.block.state.invalid_vanilla", e, blockState);
}
}
- return VanillaStateParseResult.success(registryId);
- }
-
- public record VanillaStateParseResult(boolean success, int result, String reason, String[] args) {
-
- public static VanillaStateParseResult success(int result) {
- return new VanillaStateParseResult(true, result, null, null);
- }
-
- public static VanillaStateParseResult failure(String reason, String[] args) {
- return new VanillaStateParseResult(false, -1, reason, args);
- }
+ return registryId;
}
private void loadMappingsAndAdditionalBlocks() {
@@ -837,9 +802,19 @@ public class BukkitBlockManager extends AbstractBlockManager {
return states.get(0);
}
+ @SuppressWarnings("unchecked")
private void deceiveBukkit(Object newBlock, Key replacedBlock, boolean isNoteBlock) throws IllegalAccessException {
- @SuppressWarnings("unchecked")
Map