mCraft
适用于 Paper、Purpur 和 Folia 的自定义物品及精确形状/非形状配方。
功能介绍
- 使用稳定的 PDC ID、版本号、MiniMessage 名称/描述、附魔、不可破坏状态以及现代
item_model 组件定义自定义物品。
- 创建具有精确自定义物品原料的形状和非形状配方。
- 按材质索引配方候选项,而非在每次网格更新时扫描所有配方。
- 提供本地化的游戏内浏览器和虚拟配方编辑器。编辑器的预览绝不会消耗或复制玩家拥有的物品。
- 支持配方权限、最低等级要求、世界白名单以及自动化条件。
- 添加物品标签和物品标志,并自动进行版本升级,同时保留堆叠数量和耐久度。
- 通过 Bukkit Services Manager 暴露
MCraftAPI,包括标签查询和防止溢出的物品发放功能。
mCraft 使用现代的 item_model 组件,但不会生成或分发资源包。
环境要求
- Java 25
- Paper、Purpur 或 Folia 26.3
安装
- 将
mCraft-1.1.1.jar 放入 plugins 文件夹。
- 启动服务器。
- 在
plugins/mCraft/items 下添加物品定义,或使用 GUI 配方编辑器。
物品使用稳定的 mcraft:item_id 和 mcraft:item_version PDC 标签。更改物品定义后,请增加物品的 version;旧版物品在加入游戏、拾取或切换到快捷栏时会自动升级,且无需修复其耐久度。
默认语言为英语。在 config.yml 中设置 language: ru_RU 并运行 /mcraft reload 可切换至俄语。现有的语言文件会自动接收新的默认键值。
物品示例
id: ruby_sword
material: DIAMOND_SWORD
display-name: "<red>Ruby Sword"
lore:
- "<gray>Forged from ruby"
version: 2
item-model: "my_pack:ruby_sword"
unbreakable: false
tags: [weapon, ruby]
item-flags: [hide_attributes]
enchantments:
sharpness: 6
ID 必须匹配 [a-z0-9][a-z0-9_-]{0,63}。如果文件包含无效的 ID 或格式错误的值,插件会发出针对性警告并跳过该文件,而不会导致插件禁用。
配方条件
游戏内编辑器用于创建形状和非形状配方。高级条件可以添加到生成的配方 YAML 中:
conditions:
permission: "mcraft.craft.ruby_sword"
minimum-level: 15
worlds: [world, world_nether]
allow-automation: false
自定义原料通过稳定的 PDC ID 进行匹配,而非显示名称或基础材质。原版原料故意拒绝由相同材质制成的 mCraft 自定义物品。
命令与权限
/mcraft — 图形界面,权限 mcraft.command.mcraft
/mcraft item <id> — 直接打开指定物品
/mcraft recipe <id> — 直接打开指定配方
/mcraft give <id> [amount] [player] — 权限 mcraft.command.give
/mcraft reload — 权限 mcraft.command.reload
mcraft.admin 授予所有权限。
API
从 Bukkit 的 Services Manager 获取 MCraftAPI。它支持物品查找、标签查找、ID 查找、防溢出发放,以及在无直接存储访问权限的情况下升级旧版物品。
遥测与更新
mCraft 使用匿名的 bStats 指标。通过设置 metrics.enabled: false 可禁用它们。系统不会收集任何物品内容或玩家标识符。通过单独设置 updates.enabled: false 可禁用公开版本检查。
构建
./gradlew clean build
受 MIT License 许可保护。
mCraft
Custom items and exact shaped or shapeless recipes for Paper, Purpur, and Folia.
What it does
- Defines custom items with stable PDC IDs, versions, MiniMessage names/lore, enchantments, unbreakable state, and modern
item_model components.
- Creates shaped and shapeless recipes with exact custom-item ingredients.
- Indexes recipe candidates by material instead of scanning every recipe on each grid update.
- Provides a localized in-game browser and virtual recipe editor. Editor previews never consume or duplicate player-owned items.
- Supports recipe permission, minimum-level, world allow-list, and automation conditions.
- Adds item tags and item flags, plus automatic version upgrades that preserve stack amount and durability.
- Exposes
MCraftAPI through Bukkit Services Manager, including tag queries and overflow-safe item grants.
mCraft uses modern item_model components but does not generate or distribute resource packs.
Requirements
- Java 25
- Paper, Purpur, or Folia 26.3
Install
- Put
mCraft-1.1.1.jar in plugins.
- Start the server.
- Add item definitions under
plugins/mCraft/items or use the GUI recipe editor.
Items use stable mcraft:item_id and mcraft:item_version PDC tags. Increment an item's version after changing its definition; old copies upgrade on join, pickup, or hotbar selection without repairing their durability.
English is the default language. Set language: ru_RU in config.yml and run /mcraft reload to switch to Russian. Existing language files receive new default keys automatically.
Item example
id: ruby_sword
material: DIAMOND_SWORD
display-name: "<red>Ruby Sword"
lore:
- "<gray>Forged from ruby"
version: 2
item-model: "my_pack:ruby_sword"
unbreakable: false
tags: [weapon, ruby]
item-flags: [hide_attributes]
enchantments:
sharpness: 6
IDs must match [a-z0-9][a-z0-9_-]{0,63}. Files with invalid IDs or malformed values are skipped with a focused warning instead of disabling the plugin.
Recipe conditions
The in-game editor creates shaped and shapeless recipes. Advanced conditions can be added to the generated recipe YAML:
conditions:
permission: "mcraft.craft.ruby_sword"
minimum-level: 15
worlds: [world, world_nether]
allow-automation: false
Custom ingredients are matched by stable PDC ID, not display name or base material. Vanilla ingredients deliberately reject mCraft custom items made from the same material.
Commands and permissions
/mcraft — GUI, mcraft.command.mcraft
/mcraft item <id> — open an item directly
/mcraft recipe <id> — open a recipe directly
/mcraft give <id> [amount] [player] — mcraft.command.give
/mcraft reload — mcraft.command.reload
mcraft.admin grants all permissions.
API
Obtain MCraftAPI from Bukkit's Services Manager. It supports item lookup, tag lookup, ID lookup, overflow-safe giving, and upgrading older item versions without direct storage access.
Telemetry and updates
mCraft uses anonymous bStats metrics. Disable them with metrics.enabled: false. No item contents or player identifiers are collected. Disable public version checks separately with updates.enabled: false.
Build
./gradlew clean build
Licensed under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧