M3EC documentation

Welcome to the M3EC Documentation.
Advanced usage information can be found here.


How to Read This Documentation

M3EC manifest files are formatted using a key: value system.



Example Projects

Test Ruby Mod
A simple M3EC test mod. GitHub link

M3EC Manifest File Syntax


#comment
A comment. Not processed by the compiler.
key: value
Defines key as value. Think of it like a series of labeled boxes.
key:
Defines a dictionary. key is then prepended to the next .key lines until another key dictionary is defined.
.key: value
Defines a key within a previously defined dictionary. For example, say there was a prior line Apples:. Then if we write the line .amount: 1 the compiler would interpret it as Apples.amount: 1.
+key: value
Appends list key with value
+.key: value
Appends list .key with value within the previously defined dictionary.

Content Types

armor
An armor item. Requires an armor material.
@: armor
Tells M3EC that this is an armor item manifest.
armor: SimpleItem
Tells M3EC that this armor item is a single textured item.
contentid: item_id
Item ID. Must be unique, there cannot be any blocks, items, etc with the same ID.
title
Item name to be displayed in-game.
slot: ARMOR_SLOT
Slot that this armor can be applied to. Must be HEAD, CHEST, LEGS, or FEET.
texture
File name (without extension) in mod textures folder to use for this item.
material
Material name this armor item is made from. Must match the contentid of an armor material.


armor material
An armor material for armor items.
@: armormaterial
Tells M3EC that this is an armor material manifest.
armormaterial: ArmorMaterial
Tells M3EC that this armor material is a basic armor material.
contentid: MaterialClass
Material class name. Must be unique, there cannot be any other classes with the same name. Should be CamelCase.
protection.helmet: 2
Protection value for any helmet of this material.
protection.chestplate: 7
Protection value for any chestplate of this material.
protection.leggings: 5
Protection value for any leggings of this material.
protection.boots: 2
Protection value for any boots of this material.
sound
Sound ID to be played when this armor is equipped. Vanilla values:
  • ITEM_ARMOR_EQUIP_LEATHER
  • ITEM_ARMOR_EQUIP_IRON
  • ITEM_ARMOR_EQUIP_GOLD
  • ITEM_ARMOR_EQUIP_DIAMOND
  • ITEM_ARMOR_EQUIP_NETHERITE (when building for 1.16 or later)
durability
Base durability of armor items of this material. Multiplied by a different value per armor piece type.
enchantability
Enchantability of the armor items of this material. Iron for example has a value of 9, whereas gold has a value of 25.
repairitem
Defines the item that this armor can be repaired with. Must be formatted like ModItems.ITEM_ID where the item name is uppercase.
Vanilla items can be used by replacing ModItems with Items.
name
Internal name of this armor material.
title
Display name of this armor material.
toughness
Toughness value for armor items of this material.
knockbackresistance
Knockback resistance for armor items of this material. (NOT YET IMPLEMENTED)
texture_layer_1
Texture layer 1 for this armor material. From the example mod:
ruby_layer_1.png
texture_layer_2
Texture layer 2 for this armor material. From the example mod:
ruby_layer_2.png


food
An edible food item.
@: food
Tells M3EC that this is a food item manifest.
food: SimpleItem
Tells M3EC that this food item is a single textured item.
contentid: item_id
Item ID. Must be unique, there cannot be any blocks, items, etc with the same ID.
title
Item name to be displayed in-game.
hunger
Amount of hunger points this food item provides when eaten.
saturation
Amount of saturation this food item provides when eaten.
texture
File name (without extension) in mod textures folder to use for this item.
alwaysedible
If this is defined, this food item will always be edible regardless of hunger.


item
A simple textured item.
@: item
Tells M3EC that this is an item manifest.
item: SimpleItem
Tells M3EC that this is a simple textured item.
contentid: item_id
Item ID. Must be unique, there cannot be any blocks, items, etc with the same ID.
title
Item name to be displayed in-game.
texture
File name (without extension) in mod textures folder to use for this item.


tool
A tool item.
@: tool
Tells M3EC that this is a tool item manifest.
tool: toolitem
Tool type. Currently only toolitem is implemented.
contentid: item_id
Item ID. Must be unique, there cannot be any blocks, items, etc with the same ID.
title
Item name to be displayed in-game.
texture
File name (without extension) in mod textures folder to use for this item.