作者:rebot | 分类:模组
Minecraft 版本: 1.21.1
平台: neoforge
标签: optimization
This mod fixes a critical schematic item exploit in the Create mod for Minecraft 1.21+. Please note: when using the mod for the first time on your server (mod_version ≥1.1), execute the command /schematic-config reload to initialize the mod configuration.
Create's schematics could store blocks/items with illegal components, allowing players to obtain unobtainable survival items.
schematicsfix-common.tomlschematicsfix.jsonl. However, please note that this feature is still experimental. Unless you know what you are doing, do not modify the default advanced configuration.schematicsfix.yamlversion: "1.0"
rules:
- name: "rule_name"
target_path: "target_path"
conditions:
- condition_list
cleanup_actions:
- cleanup_action_list
field_equals - Field value equals
type: "field_equals"
path: "field_path"
value: expected_value
field_not_equals - Field value not equals
type: "field_not_equals"
path: "field_path"
value: expected_value
field_exists - Field exists
type: "field_exists"
path: "field_path"
string_contains - String contains
type: "string_contains"
path: "field_path"
value: "string_to_find"
conditional_remove - Conditional removal
type: "conditional_remove"
target_path: "target_field_path"
condition: removal_condition (optional)
remove_strategy: "field_only" (only removes field value)
path_remove - Path removal
type: "path_remove"
target_path: "target_path"
remove_strategy: "entire_object" (removes entire object)
nested_string_remove - Nested string cleanup
type: "nested_string_remove"
target_path: "target_path"
condition: trigger_condition (optional)
remove_pattern: "regex_pattern"
remove_strategy: "regex_replace"
Example 1: Clean specific fields of valve handles
Rule name: valve_handle_capacity_cleanup
Target path: blocks[* ].nbt
Condition: id field equals "create:valve_handle"
Action1: If Network.Capacity not equals 256.0, remove this field
Action2: If Speed not equals 32.0, remove this field
Example 2: Clean container data from clipboards
Rule name: clipboard_container_cleanup
Target path: blocks[* ].nbt
Condition: id field equals "create:clipboard"
Action: Remove Item.components.minecraft:container path
Example 3: Clean click events from signs
Rule name: sign_clickevent_cleanup
Target path: blocks[ ].nbt
Condition: id field equals "minecraft:sign"
Action: Search for strings containing "clickEvent" in front_text.messages[],
use regex to remove clickEvent objects
version: "1.0"
rules:
- name: "valve_handle_capacity_cleanup"
target_path: "blocks[*].nbt"
conditions:
- type: "field_equals"
path: "id"
value: "create:valve_handle"
cleanup_actions:
- type: "conditional_remove"
target_path: "Network.Capacity"
condition:
type: "field_not_equals"
path: "Network.Capacity"
value: 256.0
remove_strategy: "field_only"
- type: "conditional_remove"
target_path: "Speed"
condition:
type: "field_not_equals"
path: "Speed"
value: 32.0
remove_strategy: "field_only"
- name: "clipboard_container_cleanup"
target_path: "blocks[*].nbt"
conditions:
- type: "field_equals"
path: "id"
value: "create:clipboard"
cleanup_actions:
- type: "path_remove"
target_path: "Item.components.minecraft:container"
remove_strategy: "entire_object"
- name: "sign_clickevent_cleanup"
target_path: "blocks[*].nbt"
conditions:
- type: "field_equals"
path: "id"
value: "minecraft:sign"
cleanup_actions:
- type: "nested_string_remove"
target_path: "front_text.messages[*]"
condition:
type: "string_contains"
value: "clickEvent"
remove_pattern: "\"clickEvent\":\\s*\\{[^}]*\\}"
remove_strategy: "regex_replace"
/schematic-config reload to reload configuration after changes/schematic-config rules to view loaded rules/schematic-config status to check mod status请登录后举报
暂无评论,抢个沙发吧~