CraftEngine Mappings
Overview
CraftEngine Mappings is a mapping system for converting Java 1.21+ item model systems to Bedrock Edition. It reads item definitions from YAML configuration files with template support and generates the appropriate Geyser mappings.
Supported Format
CraftEngine Mappings uses the CraftEngine YAML configuration files with template system support.
YAML Format
File Location
Place YAML files under CraftEngine/resources/ within your resource pack:
your-pack.zip
├── CraftEngine/
│ └── resources/
│ ├── weapons.yml
│ ├── armor.yml
│ └── tools.yml
└── assets/
└── ...YAML Structure
YAML Field Reference
material
string
✅
Bukkit Material name (e.g., NETHERITE_SWORD)
model.path / model
string
❌
Model file path for item definition lookup
texture
string
❌
Single texture path (alternative to model)
textures
array
❌
Array of texture paths (uses first for lookup)
template
string/array
❌
Template name(s) to inherit from
arguments
object
❌
Variables for template substitution
data.custom-model-data
number
❌
Custom model data value
data.max-damage
number
❌
Maximum durability for the item
data.max-stack-size
number
❌
Maximum stack size
settings.equipment.slot
string
❌
Equipment slot: HEAD, CHEST, LEGS, FEET, BODY, MAINHAND, OFFHAND
settings.equipment.asset-id
string
❌
Equipment model ID
YAML Examples
Basic weapons and tools:
Using templates:
Multiple templates:
Using textures instead of models:
Complex example with mixed types:
Item Key Format
Item keys in CraftEngine use the format namespace:item_key:
Examples:
default:bench→ namespace:default, item:benchcustom:ruby_sword→ namespace:custom, item:ruby_swordarmor:knight_helmet→ namespace:armor, item:knight_helmet
The namespace is extracted from the item key and used for item definition resolution.
Item Definition Resolution
CraftEngine resolves item definitions in the following priority.
Namespace handling:
Namespace from item key (e.g.,
default:bench→default)Falls back to
minecraftif not found in preferred namespaceSearches all namespaces as last resort
Template System
CraftEngine supports a powerful template system with variable substitution.
Template Features
Basic inheritance:
Multiple templates:
Templates are applied in order, with later values overriding earlier ones.
Variable substitution:
Variables use ${variable_name} syntax and are replaced with values from arguments.
Nested templates:
Templates can reference other templates, with circular reference protection.
Material Names
Use standard Bukkit Material enum names for material.
Common materials:
Swords:
WOODEN_SWORD,STONE_SWORD,IRON_SWORD,GOLDEN_SWORD,DIAMOND_SWORD,NETHERITE_SWORDTools:
WOODEN_PICKAXE,STONE_AXE,IRON_SHOVEL,DIAMOND_HOE, etc.Armor:
LEATHER_HELMET,CHAINMAIL_CHESTPLATE,IRON_LEGGINGS,DIAMOND_BOOTS, etc.Ranged:
BOW,CROSSBOW,TRIDENTOther:
STICK,FISHING_ROD,SHIELD,ELYTRA,PAPER,CARROT_ON_A_STICK
Note: Legacy material names (e.g., LEGACY_IRON_SWORD) are automatically cleaned.
Equipment Slots
When using settings.equipment.slot:
HEAD
Helmets, hats, crowns
CHEST
Chestplates, tunics
LEGS
Leggings, pants
FEET
Boots, shoes
BODY
Body equipment (horse armor, wolf armor)
MAINHAND
Main hand equipment
OFFHAND
Off-hand equipment
Troubleshooting
Common Issues
YAML not being read:
Ensure files are under
CraftEngine/resources/directoryCheck that files have
.ymlor.yamlextensionVerify YAML syntax is valid (use a YAML validator)
Template variables not working:
Check variable syntax:
${variable_name}Ensure
argumentsfield is defined with matching keysVerify template is referenced correctly
Template not found:
Confirm template name matches exactly (case-sensitive)
Ensure template is defined in
templates:sectionCheck for typos in template references
Items not mapping:
Verify
materialuses correct Bukkit Material namesCheck that model/texture paths are specified
Ensure namespace is included in item key
Verify item definition files exist
Namespace not detected:
Include namespace in item key:
namespace:item_keyCheck for colon separator in key
Armor not working:
Ensure
settings.equipment.slotis setVerify
asset-idis specifiedCheck that equipment model exists
Confirm item definition matches configuration
Example Project Structure
Important Notes
Item Key Namespace
The namespace in the item key (e.g., default:bench) determines the preferred namespace for item definition lookup. This allows organizing items by namespace while using centralized YAML files.
Template Inheritance
Templates provide powerful reusability:
Define common properties once
Apply to multiple items
Override specific fields per item
Use variable substitution for flexibility
Model vs Texture
CraftEngine supports multiple ways to specify models:
model.pathormodel- Direct model pathtexture- Single texture pathtextures- Array of textures (uses first)
All three methods extract a basename for item definition lookup.
Equipment Configuration
Use settings.equipment for armor items:
slot- Where the item is equippedasset-id- The equipment model ID
The asset-id can include namespace: namespace:model_id
Durability vs Max Stack Size
Items with equipment automatically have
max_stack_size: 1Non-equipment items can have custom
max_stack_sizeDurability is specified in
data.max-damage