Changes in the "itemdef" patchset

This page documents the changes that are included in the itemdef patchset.

The itemdef patchset was written by kahrl between the mid of December 2011 and the beginning of January 2012.

Some additional changes have been made during January 2012, in particular: Tooltips and item dragging in the inventory menu; iron has become more common; minerals (coal and iron) are separate nodes now instead of parameters of default:stone; nodes have on_place, on_punch, on_dig callbacks defined in Lua; dug_item, extra_dug_item and extra_dug_item_rarity have been deleted and replaced by the drop field.


The purpose of the patchset is to combine all items (be they nodes, tools, or craftitems) into one common namespace. This has several benefits:

  • Mod code that uses, creates or manipulates items will be easier to write.
  • As a simple example, in a crafting recipe, you'll be able to write “default:stick” instead of 'craft “default:stick”'.
  • /give and /giveme arguments will be simpler as well.
  • It will be easier to write code that manipulates itemstacks, and it will then probably already work with all three kinds of items.
  • For that reason, it will be easier to make an improved interface to item stacks from Lua. In fact, the patchset includes such an interface.
  • You'll also be able to have on_use callbacks for tools or even nodes, previously that was only possible for craftitems. Similarly, you could define tool digging properties for items that are not tools (and they will be effective when digging with that item in hand), if you're so inclined.

The patchset also includes some other, random things:

  • The crafting manager was completely rewritten and now has many more features.
  • Items are drawn slightly differently in the inventory: Stacks of size 1 don't show their number, and the progressbar for tools changes its color based on how damaged the tool is.


Compatibility changes

  • Because the format of item stacks has changed, the map format has changed as well.
  • It should be safe to load a map from minetest 0.3 (or earlier) or 0.4-dev; I (kahrl) explicitly tested maps from 0.3 as well as
    • However, this will convert the map and it's currently impossible to convert it back. Old versions won't be able to correctly load the map after it has been converted.
    • Just to be safe, consider making a backup of your world before loading it.
  • The network protocol version has been incremented (6 → 7). Old clients can't connect to servers with this patch, and client with this mod can't connect to servers without it.
  • Mods may have to be changed to work again, see the link below.

Changes visible to all players

See players

Changes visible to modders

See modders

All code changes

See code

changes/itemdef.txt · Last modified: 2013/01/14 22:47 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki