Skip to content

How to make a new item in a Minecraft mod

An item is registered once in the game’s item registry. It needs an item model and a 16x16 texture to show, an English name, and a place in a creative tab so players can find it.

Works on Minecraft 1.20.1 to 26.3 on NeoForge; Minecraft 1.16.5 to 26.3 on Fabric; Minecraft 1.16.5 to 1.20.1 on Forge; Minecraft 1.12.2 on Forge. Each example was compiled against its loader and version before it shipped in Linen.

  1. Register the item in your items class (with its Item.Properties on 1.13 and newer).
  2. Add its item model JSON and a 16x16 texture.
  3. Give it an English name in the lang file (en_us.json, or en_us.lang on 1.12.2).
  4. Put it in a creative tab.

The example mod is examplemod in the package com.example.examplemod. Use your own mod id and package.

Uses:

  • Registry.register
  • BuiltInRegistries.ITEM
  • Item.Properties
  • ItemGroupEvents.modifyEntriesEvent

NeoForge 1.20.1 to 1.21, Forge 1.17.1 to 1.20.1

Section titled “NeoForge 1.20.1 to 1.21, Forge 1.17.1 to 1.20.1”

Uses:

  • DeferredRegister.create
  • ForgeRegistries.ITEMS
  • RegistryObject
  • Item.Properties
  • BuildCreativeModeTabContentsEvent

Uses:

  • Registry.register
  • BuiltInRegistries.ITEM
  • Item
  • Item.Properties
  • ItemGroupEvents.modifyEntriesEvent

Uses:

  • DeferredRegister.createItems
  • DeferredRegister.Items.registerSimpleItem
  • DeferredItem
  • Item.Properties
  • BuildCreativeModeTabContentsEvent

Uses:

  • Registry.register
  • BuiltInRegistries.ITEM
  • ResourceKey.create
  • Item.Properties.setId
  • ItemGroupEvents.modifyEntriesEvent

From 1.21.4 the item also needs a client item definition, assets/<mod_id>/items/<name>.json, that points at its model.

Uses:

  • Registry.register
  • BuiltInRegistries.ITEM
  • Item
  • Item.Properties
  • ItemGroupEvents.modifyEntriesEvent

From 1.21.4 the item also needs a client item definition, assets/<mod_id>/items/<name>.json, that points at its model.

Uses:

  • DeferredRegister.createItems
  • DeferredRegister.Items.registerSimpleItem
  • DeferredItem
  • Item.Properties
  • BuildCreativeModeTabContentsEvent

From 1.21.4 the item also needs a client item definition, assets/<mod_id>/items/<name>.json, that points at its model.

Uses:

  • DeferredRegister.create
  • ForgeRegistries.ITEMS
  • RegistryObject
  • Item.Properties.tab
  • ItemGroup

Uses:

  • RegistryEvent.Register<Item>
  • Item.setRegistryName
  • Item.setUnlocalizedName
  • Item.setCreativeTab
  • ModelLoader.setCustomModelResourceLocation

In 1.12.2 an item is registered in a RegistryEvent.Register<Item> handler (event.getRegistry().register(item)) with setRegistryName and setUnlocalizedName; its model is set with ModelLoader in a ModelRegistryEvent handler, and it joins a creative tab with setCreativeTab.

Linen’s How-tos library has this page too, with the example for your own mod’s loader and Minecraft version. Hover a name in your code and Linen points to the how-tos that explain it. Both are free. Download Linen.