Skip to main content

A first item

items/gems/ruby.yml
Run /lodeitems reload, then /lodeitems give ruby. A custom item is a normal vanilla item with your look and data on top. It is not added to the game’s item list, so you can add and remove items with a reload, without a restart, and it works alongside mods. LodeItems recognises its own items by a hidden tag, so renaming one or changing its lore never breaks it.

Basic options

item id
default:"paper"
The vanilla (or modded) item it is built on. It decides what the item does by default: a diamond_sword swings and has durability, bow shoots, iron_chestplate can be worn. Modded items use their full id, such as create:wrench.
text
The item’s name, in MiniMessage.
list of text
Lines under the name.
file
A .png for a flat item. Tools and weapons (swords, axes, pickaxes, shovels, hoes, spears, rods, sticks, bones, the mace and the trident) are held at an angle, like vanilla tools.
file
A .json model, such as one exported from Blockbench. Use either texture or model, not both.
text
The tab it goes in in the item browser. Defaults to the first folder under items/ it lives in, or misc for files directly in items/.

Stats

Attributes

For anything beyond damage and speed, list attribute modifiers:

Food

Any item can be made edible this way, even one whose material can’t be eaten.

Any vanilla data component

Everything Minecraft can store on an item can go under components:, written exactly as /give writes it. Minecraft itself checks it, so every component works, including ones added in future updates. A wrong value is reported with its line.
The options are applied in this order, and later ones win:
  1. The material’s own data.
  2. The shortcut options above (durability, food…).
  3. damage, attack-speed and attributes.
  4. components:.
  5. remove-components:.
  6. name, lore and the model. These always win.
/lodeitems inspect <item> prints every component the item ends up with. Use it to check what your config produced.

Vanilla behaviour

By default a custom item stops acting as its base item in ways that would be surprising. A ruby built on paper isn’t used as paper in vanilla recipes, and one built on stone doesn’t place stone. It also isn’t smelted, burned as fuel or repaired in an anvil as its base item.
Recipes you write yourself always work.

More

Item mechanics

Backpacks, hammers, auto-smelting, harvesting, keeping items on death and more.

Armour

Custom worn textures, elytra, horse armour and set bonuses.

Events and actions

Run commands, effects and sounds when an item is used.

Recipes

Crafting, smelting, smithing and brewing.