Skip to content

Item Types

Built-in Types

Item

Represents a normal item.

Additional Properties

NameTypeDescription
ItemItemData for the real item.

Item NBT

Common NBT for all items

NameTypeDescriptionExample
idStringThe Minecraft ID of the itemminecraft:paper
tagObjectNBT data for the item.{CustomModelData: 5}

Example

WARNING

This is an expanded view of the item and should be on one line.

snbt
{
  type: "item",
  id: "example:my_item",
  Item: {
    id: "minecraft:paper",
    tag: {CustomModelData: 5}
  }
}

Loot Table

Represents a loot table item

Additional Properties

NameTypeDescriptionExample
tableStringThe loot table to useminecraft:chests/simple_dungeon

Example

WARNING

This is an expanded view of the item and should be on one line.

snbt
{
  type: "loot_table",
  id: "example:my_loot_item",
  table: "minecraft:chests/simple_dungeon"
}

Custom Types

  1. Create a MCFUNCTION file in your datapack called item_types.mcfunction. This file can be located anywhere in your datapack.
  2. Now using the NBT Schema and examples from below you can add all your item types to the created item_types.mcfunction.
  3. You now need to create a function tag located data/rcore/tags/functions/register_item_types.json and enter the path to your item types function.
  4. Now in-game run /reload to reload your datapack. Then run /function rcore:reload to reload all item types

Item Type Schema

NameTypeRequiredDescription
idStringyesID of the item type used in items
functionStringyesThe function to call to drop this item

Not associated with or approved by Mojang Studios or Microsoft