Item Builder

An "Item Builder" is a JSON configuration for a Minecraft ItemStack. It's used in a number of our mods to make key items configurable, such as the Pokedex in PPokedex or the Pasture Activation Item in BetterBreeding. The same format is also used in our Configurable Items config files.

Here's what a relatively packed Item Builder looks like:

{
    "id": "minecraft:popped_chorus_fruit",
    "name": "<bold><white>Pokedex",
    "customModelData": 1169,
    "lore": [
      "<dark_purple>Powered by Roanoke Ltd.",
      "<white>Supports multiple lines!"
    ]
 }

Only one field is required for an ItemBuilder to be valid, and that is "id". The rest are entirely optional. The "name" and "lore" fields are parsed using the MiniMessage format, so they support full colours/rgb/gradients etc.

Using Item Builder to "match" Items

As of Roanoke Library (Rib)v1.9.3, ItemBuilders can "match" items. This is used to power BetterBreeding's Pasture Activation Items.

A match only considers the "id" and "customModelData" fields, so your items can have whatever lore/names you'd like.

Pokemon Items

As of Rib v2.1.3 (MC 1.21.1), you can define Pokemon Items using ItemBuilder, like so:

{
   "pokemon": "gengar shiny",
   "name": "Shiny Gengar",
   "lore": ["<red>example lore"]
}

You can use either "pokemon" or "id", if you use both, it'll default to using Pokemon. The text format for Pokemon, (in example it's "gengar shiny") are Pokemon Properties, which is basically the text you write after /pokegive <pokemon properties>

Last updated