-
Notifications
You must be signed in to change notification settings - Fork 8
Custom Items
GoCraft's cross-edition custom item system: define an item once in YAML, and GoCraft auto-generates a Java resource pack and a Bedrock behavior/resource pack at startup. No manual pack authoring required.
packs/
mypacks/
items.yml ← item definitions
textures/
ruby.png ← 16×16 PNG textures
ruby_sword.png
.registry.yml ← auto-generated; do not edit
Each sub-directory under packs/ is one pack. The location is configurable via custom_items.packs_dir in server.yml.
namespace: mypacks # unique lowercase identifier, no spaces
items:
ruby:
display_name: "<red>Ruby"
material: paper # vanilla Java base item (lowercase)
texture: ruby.png # filename inside textures/
ruby_sword:
display_name: "<gradient:#ff0000:#aa0000>Ruby Sword"
material: diamond_sword
texture: ruby_sword.png
parent: item/handheld # model parent (default: item/generated)
hand_equipped: true # Bedrock: larger item in hand (tool/weapon feel)
max_stack_size: 1 # default 64| Field | Required | Description |
|---|---|---|
display_name |
Yes | MiniMessage-formatted name. Supports <red>, <gradient:#start:#end>, <bold>, etc. |
material |
Yes | Vanilla Java base item (e.g. paper, iron_ingot, diamond_sword). Items sharing a material share one model-override file. |
texture |
Yes | PNG filename inside the pack's textures/ directory. |
parent |
No | Java model parent. item/generated (flat, default) or item/handheld (tool grip). |
hand_equipped |
No | Bedrock only — shows the item larger in the hand. Default false. |
max_stack_size |
No | Maximum stack size. Default 64. |
On Bedrock, MiniMessage tags are stripped automatically (Bedrock uses a different text format) — only the plain text is shown there.
custom_items:
enabled: true
packs_dir: packs # directory containing pack sub-folders
java:
serve_port: 8080 # port the embedded HTTP server binds on
public_host: "" # your server's public IP or domainPterodactyl note: Open
serve_port(default8080) as an additional TCP port on your egg, and setpublic_hostto your server's public IP/domain. Java clients download the pack fromhttp://<public_host>:8080/<hash>.zipautomatically. Ifresource_pack.java.urlis set manually, the custom-items system overrides it with the auto-generated URL.
- At startup GoCraft reads all packs and assigns a stable CustomModelData (CMD) integer per item (starting at
30100, matching the CustomiZer convention). - A resource-pack ZIP is generated in memory:
-
assets/minecraft/models/item/<material>.json— CMD overrides pointing to custom models -
assets/<namespace>/models/item/<id>.json— the item model (flat or handheld) -
assets/<namespace>/textures/item/<id>.png— the texture
-
- The ZIP is served over HTTP on
serve_port; its SHA-1 hash is sent with the URL so clients cache it. - Players receive the pack during the configuration phase and see custom visuals for any stack carrying the matching CMD.
- GoCraft generates a
.mcaddonin memory containing a resource pack (textures +item_texture.json) and a behavior pack (oneitems/<ns>/<id>.jsonper item). - The
.mcaddonis injected into the Bedrock listener's pack list and pushed at login. - Custom identifiers and runtime IDs are registered in the StartGame packet's item table (
ComponentBased: true), so Bedrock clients recognise the items without a full vanilla server.
CMD values and Bedrock runtime IDs are assigned once and persisted to packs/.registry.yml. They never change between restarts, so items already stored in world saves or player inventories stay valid after updates. Do not edit .registry.yml by hand.
Use the give commands with the namespaced ID (see Commands), e.g. /give <player> mypacks:ruby_sword.
- Textures are 16×16 PNGs referenced by filename.
- Behavior beyond appearance/stack-size (custom durability logic, abilities) is limited — the system focuses on cross-edition item identity and visuals.
GoCraft — native-Go Minecraft server · Java 1.21.4 + Bedrock 1.26.45 cross-play · GPL-3.0 · © 2026 Oreo Studios · Discord
Playing on GoCraft
Server & cross-play
Internals