本模组已停止维护,将不再接收更新或支持。请访问 以查找类似的模组。
概述
本模组修复了 Minecraft 1.21+ 版本中 Create 模组的一个关键结构图物品漏洞。请注意:在服务器首次使用本模组时(mod_version ≥1.1),请执行命令 /schematic-config reload 以初始化模组配置。
原始问题
Create 的结构图可以存储包含非法组件的方块/物品,允许玩家获取无法在生存模式中获得的游戏内物品。
修复功能
- 异常检测:实时扫描上传的结构图
- 数据清洗:自动移除非法组件/黑名单中的方块
- 告警日志:当玩家上传异常结构图时输出服务器警告
- 自动归档:将异常结构图备份至
/schematics/anomaly/playername/schematic.nbt
适用于 mod_version<1.1.3
- 可配置:通过
schematicsfix-common.toml 管理黑名单
- 高级配置功能:您可以在
schematicsfix.jsonl 中使用 JSON 定义结构图 NBT 检测逻辑。但请注意,此功能仍处于实验阶段。除非您清楚自己在做什么,否则请勿修改默认的高级配置。
适用于 mod_version≥1.1.3
- 可配置:通过
schematicsfix.yaml 自由定义 NBT 过滤规则
管理员优势
- 实时阻止漏洞利用
- 自动保留证据
- 可自定义过滤规则
- 合法上传无需人工审核
配置文件格式 (mod_version≥1.1.3)
配置文件位置:config/schematicsfix.yaml
基本结构:
version: "1.0"
rules:
- name: "rule_name"
target_path: "target_path"
conditions:
- condition_list
cleanup_actions:
- cleanup_action_list
规则字段:
- name: 规则的唯一标识符,用于日志记录和命令显示
- target_path: 在 NBT 数据中搜索的目标路径,支持通配符
- conditions: 必须全部满足才能触发清理的条件列表
- cleanup_actions: 条件满足时执行的清理操作列表
路径语法:
- 普通路径:使用点号分隔,例如
"blocks.nbt.id"
- 通配符:使用
[*] 匹配所有数组元素
示例:"blocks[*].nbt" 匹配所有 blocks 数组中的 nbt 字段
示例:"messages[*]" 匹配 messages 数组中的所有元素
- 特定索引:使用
[数字] 匹配特定的数组索引
示例:"messages[0]" 匹配 messages 数组中的第一个元素
条件类型:
field_equals - 字段值等于
type: "field_equals"
path: "field_path"
value: expected_value
field_not_equals - 字段值不等于
type: "field_not_equals"
path: "field_path"
value: expected_value
field_exists - 字段存在
type: "field_exists"
path: "field_path"
string_contains - 字符串包含
type: "string_contains"
path: "field_path"
value: "string_to_find"
清理操作类型:
conditional_remove - 条件移除
type: "conditional_remove"
target_path: "target_field_path"
condition: removal_condition (可选)
remove_strategy: "field_only" (仅移除字段值)
path_remove - 路径移除
type: "path_remove"
target_path: "target_path"
remove_strategy: "entire_object" (移除整个对象)
nested_string_remove - 嵌套字符串清理
type: "nested_string_remove"
target_path: "target_path"
condition: trigger_condition (可选)
remove_pattern: "regex_pattern"
remove_strategy: "regex_replace"
完整示例:
示例 1:清理阀门手柄的特定字段
规则名称:valve_handle_capacity_cleanup
目标路径:blocks[*].nbt
条件:id 字段等于 "create:valve_handle"
操作1:如果 Network.Capacity 不等于 256.0,则移除此字段
操作2:如果 Speed 不等于 32.0,则移除此字段
示例 2:清理剪贴板中的容器数据
规则名称:clipboard_container_cleanup
目标路径:blocks[*].nbt
条件:id 字段等于 "create:clipboard"
操作:移除 Item.components.minecraft:container 路径
示例 3:清理告示牌中的点击事件
规则名称:sign_clickevent_cleanup
目标路径:blocks[].nbt
条件:id 字段等于 "minecraft:sign"
操作:在前端文本 messages[] 中搜索包含 "clickEvent" 的字符串,
使用正则表达式移除 clickEvent 对象
配置示例代码:
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 重新加载配置
- 使用
/schematic-config rules 查看已加载的规则
- 使用
/schematic-config status 检查模组状态
- 所有操作均为移除操作,不支持替换功能
- 正则表达式采用 Java 标准语法
- 确保 YAML 文件使用正确的缩进(空格,而非制表符)
This mod has been discontinued and will no longer receive updates or support. Please visit to find a similar mod.
Overview
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.
Original Issue
Create's schematics could store blocks/items with illegal components, allowing players to obtain unobtainable survival items.
Fix Features
- Anomaly Detection: Scans uploaded schematics in real-time
- Data Sanitization: Automatically removes illegal components/blacklisted blocks
- Alert Logging: Outputs server warning when player uploaded anomaly schematic
- Auto-Archiving: Backups anomalous schematics at:/schematics/anomaly/playername/schematic.nbt
For mod_version<1.1.3
- Configurable: Blacklist management via
schematicsfix-common.toml
- Advanced Configuration Feature: You can define the schematic NBT detection logic using JSON in
schematicsfix.jsonl. However, please note that this feature is still experimental. Unless you know what you are doing, do not modify the default advanced configuration.
For mod_version≥1.1.3
- Configurable:Define NBT filter rules freely through
schematicsfix.yaml
Admin Benefits
- Real-time exploit blocking
- Automatic evidence preservation
- Customizable filter rules
- Zero manual review for legitimate uploads
Configuration File Format (mod_version≥1.1.3)
Configuration File Location: config/schematicsfix.yaml
Basic Structure:
version: "1.0"
rules:
- name: "rule_name"
target_path: "target_path"
conditions:
- condition_list
cleanup_actions:
- cleanup_action_list
Rule Fields:
- name: Unique identifier for the rule, used for logging and command display
- target_path: Target path to search for in NBT data, supports wildcards
- conditions: List of conditions that must all be satisfied to trigger cleanup
- cleanup_actions: List of cleanup actions to execute when conditions are met
Path Syntax:
- Normal path: Use dots to separate, e.g., "blocks.nbt.id"
- Wildcard: Use [* ] to match all array elements
Example: "blocks[* ].nbt" matches nbt fields in all blocks arrays
Example: "messages[* ]" matches all elements in messages array
- Specific index: Use [number] to match specific array index
Example: "messages[0]" matches the first element in messages array
Condition Types:
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"
Cleanup Action Types:
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"
Complete Examples:
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
Configuration Example Code:
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"
Important Notes:
- Use
/schematic-config reload to reload configuration after changes
- Use
/schematic-config rules to view loaded rules
- Use
/schematic-config status to check mod status
- All operations are removal operations only, no replacement functionality
- Regular expressions use Java standard syntax
- Make sure YAML file uses proper indentation (spaces, not tabs)
评论 0
登录后参与评分
还没有评论,来抢沙发吧