• 你好,Guest,欢迎回来!Nukkit-MOT BBS社区是专为Minecraft玩家和开发者提供的Nukkit-MOT平台技术论坛。Nukkit-MOT是一个多版本、内置实体AI、广泛插件兼容的我的世界服务器软件,采用Java编写,专为性能和可扩展性设计,支持插件开发和自定义功能。在Nukkit-MOT BBS,您可以轻松找到开服教程、插件开发资源和插件分享,帮助您快速搭建和管理Nukkit-MOT服务器,提升开发技能,推广您的插件。

    You can join [Discord] to get the latest notifications.
    为了避免一些意外情况,你可以【加入QQ群】来获取最新通知
CustomCraft

Open Source CustomCraft 2.0.0-SNAPSHOT

Resource Type
Second modification
Copyright Link
https://github.com/MemoriesOfTime/CustomCraft/

CustomCraft

A custom crafting and furnace recipe plugin for Nukkit-MOT

Features

  • Supports shapeless crafting (similar to dye crafting)
  • Supports shaped crafting (similar to tool crafting, requires a specific pattern)
  • Supports craft count limits
  • Supports extra output items
  • Supports NBT items as crafting inputs or outputs
  • Provides convenient in-game commands to add item configurations

Installation

  1. Download the CustomCraft plugin .jar file
  2. Place the jar file into the plugins folder of your Nukkit-MOT server
  3. Restart the server
  4. The plugin will automatically generate configuration files in plugins/CustomCraft

Configuration Guide

craft.json - Crafting Recipe Configuration

Config file location: plugins/CustomCraft/craft.json

Configuration Fields

Field Type Description
type Integer Recipe type: 0 = shapeless, 1 = shaped
maxCraftCount Integer Maximum craft count: -1 = unlimited, other values = specific limit (feature not fully implemented yet)
input Array/Object Input materials (see formats below)
output String Output item (format: ItemID:Damage:Amount)
shape Array Required for shaped recipes, defines crafting grid pattern
extraOutput Array Optional, list of additional output items

Item Format Description

The plugin supports three item formats:

1. Normal Item Format

  • Format: ItemID:Damage:Amount
  • Example: 58:0:1 → 1 crafting table (ID: 58, damage: 0)
  • Example: 3:0 → dirt (ID: 3, damage: 0), amount defaults to 1
  • Example: 35:14:5 → 5 red wool (ID: 35, damage: 14)

2. NBT Item Format (Items with Special Attributes)

Used for items with enchantments, custom names, lore, or other NBT data.

  • Reference format: ItemName@nbt
  • Usage steps:
    1. Hold the item in-game and run /craft add <name> to save it
    2. Reference it in recipes using Name@nbt

Examples:

  • Input reference: "input": ["GodSword@nbt"]
  • Output reference: "output": "GodSword@nbt"

Notes:

  • Actual NBT data is stored in nbtItems.json in the format
    ItemID:Damage:Amount:NBTData (auto-generated, no manual editing required)
  • If the item changes (enchantments, name, lore, etc.), you must re-run /craft add <name>
  • If you don’t know the numeric ID or damage value, you can still use /craft add <name> and treat it as an NBT item

3. Namespaced Item Format (Custom Items)

Used for modern namespaced IDs:

  • Format: namespace:item:amount
  • Examples:
    • minecraft:diamond_sword:1
    • minecraft:netherite_ingot:1

Mixed Item Format Example

{
  "type": 1,
  "maxCraftCount": -1,
  "input": {
    "A": "GodSword@nbt",
    "B": "minecraft:diamond:0:1",
    "C": "minecraft:netherite_ingot:1"
  },
  "shape": [
    "ABA",
    "BCB",
    "ABA"
  ],
  "output": "SuperGodSword@nbt"
}

Recipe Examples

Shapeless Recipe Example

(Converting dirt into a crafting table)

{
  "recipes": [
    {
      "type": 0,
      "maxCraftCount": -1,
      "input": [
        "3:0"
      ],
      "output": "58:0:1"
    }
  ]
}

Shaped Recipe Example

(9 dirt arranged in a 3×3 grid to craft a table, plus 1 extra dirt)

{
  "recipes": [
    {
      "type": 1,
      "maxCraftCount": -1,
      "input": {
        "A": "3:0"
      },
      "shape": [
        "AAA",
        "AAA",
        "AAA"
      ],
      "output": "58:0:1",
      "extraOutput": [
        "3:0:1"
      ]
    }
  ]
}

Shaped Recipe Pattern Explanation

The shape array defines the layout of items in the crafting grid:

  • "AAA" → all three slots filled with material A
  • "A A" → left and right slots filled, middle empty
  • " A " → only the center slot filled

Multiple materials can be defined:

{
  "type": 1,
  "input": {
    "A": "5:0",
    "B": "280:0"
  },
  "shape": [
    "AAA",
    " B ",
    " B "
  ],
  "output": "269:0:1"
}

This example crafts a wooden pickaxe using planks and sticks.


nbtItems.json - NBT Item Configuration

If you want to use items with special attributes (enchantments, custom names, etc.) as inputs or outputs, use in-game commands to add them.

File location: plugins/CustomCraft/nbtItems.json

NBT Item Format

This file is maintained automatically and usually should not be edited manually:

{
  "ItemName": "ItemID:Damage:Amount:NBTData"
}

Field Description:

  • ItemName: Custom identifier used in recipes
  • ItemID: Numeric ID or namespaced ID
  • Damage: Item damage / metadata
  • Amount: Item amount
  • NBTData: Base64-encoded NBT data, or not if none

Example

{
  "GodSword": "276:0:1:CgAACQQAZW5jaAoBAAAAAgIAaWQJAAIDAGx2bAMAAA==",
  "NormalDiamond": "264:0:1:not",
  "CustomItem": "minecraft:diamond_sword:1:nbt"
}

Usage

  1. Add via command (recommended):
/craft add GodSword
  1. Reference in recipes:
{
  "type": 0,
  "input": ["GodSword@nbt", "diamond:0:8"],
  "output": "SuperGodSword@nbt"
}

Notes:

  • NBT items must match exactly (enchantments, names, lore, etc.)
  • Using commands avoids manual configuration errors

Usage Guide

1. Add Simple Recipes

Edit craft.json, add recipes following the format above, then reload the plugin with /reload.

2. Create Advanced Recipes Using NBT Items

NBT items preserve all special attributes, including:

  • Enchantments
  • Custom names and lore
  • Hidden flags
  • Other NBT data

Steps

  1. Prepare your special item
    • Example: a Sharpness V diamond sword named "GodSword"
  2. Save the item
    • Hold the item
    • Run /craft add GodSword
  3. Use it in recipes
    • Format: ItemName@nbt
    • As input: "input": ["GodSword@nbt"]
    • As output: "output": "GodSword@nbt"

Full Example - Craft a Special Item

{
  "type": 1,
  "maxCraftCount": 1,
  "input": {
    "A": "diamond:0",
    "B": "emerald:0"
  },
  "shape": [
    "AAA",
    "ABA",
    "AAA"
  ],
  "output": "GodSword@nbt"
}

Full Example - Upgrade a Special Item

{
  "type": 0,
  "maxCraftCount": -1,
  "input": ["GodSword@nbt", "nether_star:0:1"],
  "output": "SuperGodSword@nbt"
}

Important Notes:

  • Player items must match saved NBT data exactly
  • Use clear, recognizable names for NBT items
  • View all saved items in nbtItems.json

Testing Recipes

  1. Save configuration files
  2. Reload the plugin using /reload
  3. Open a crafting table and test the recipe

Commands

Command Description Permission
/craft add <name> Save the held item to nbtItems configuration customcraft.craft

Permission Notes:

  • customcraft.craft is granted to OPs by default

FAQ

Q: Changes don’t take effect?
A: Restart the server after editing configuration files.

Q: How do I use enchanted items as ingredients?
A: Save them with /craft add <name> and reference them using name@nbt.

Q: Is the @nbt suffix required?
A: Yes, it is mandatory when referencing items from nbtItems.json.

Q: What’s the difference between normal and namespaced item formats?
A:

  • Normal: ID:Damage:Amount (e.g. 276:0:1)
  • Namespaced: minecraft:item_name (e.g. minecraft:diamond_sword)

Q: What is extraOutput used for?
A: It allows additional items to be given alongside the main output.

Q: Does maxCraftCount = 1 mean only one player can craft it?
A: No, it limits crafting per player, not globally.

Q: How do I view saved NBT items?
A: Open plugins/CustomCraft/nbtItems.json.


Feedback & Support

If you encounter issues or have suggestions, feel free to submit an issue:

Author
lt_name
Downloads
2
Views
2
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from lt_name

.block.block--category>.block-container:before { margin-bottom: 4px; } .message:not(:last-of-type):after { margin-bottom: -7px; }
Forgot your password?
or Log in using