Skip to content

Adding GenerateCreativeStacks behavior

Dana edited this page Apr 3, 2026 · 3 revisions

Important

Make sure to familiarize yourself with the library's syntax: Attribute‐based Matching

Here are listed all the properties that can be used for blocks and items with the GenerateCreativeStacks collectible behavior.

Add the following behavior:

"behaviors": [
    {
        "name": "AttributeRenderingLibrary.GenerateCreativeStacks",
        "properties": {
            // add properties here
        }
    }
]

properties

Note

Everything listed below can only be used in behavior's own properties

variantgroups

This property is equivalent to the base game's VariantGroups, which defines all groups from which the itemstacks in the creative inventory will be created. The main difference is that unlike the base game, which creates unique items, these variant groups will show up in the attributes instead. Example:

"variantgroups": [
    { "code": "a", "states": [ "a1", "a2", "a3" ] },
    { "code": "b", "states": [ "b1", "b2", "b3"] },
    { "code": "c", "loadFromProperties": "game:block/metal", "combine": "multiply" }
]

All functionality and requirements from RegistryObjectVariantGroup apply.

creativeinventory

This property performs the same functionality as the base game's CreativeInventory property, but uses attribute-based matching syntax instead. It allows you to define which itemstacks will end up in what tab in the creative menu. Example:

"creativeinventory": {
    "general": [ "*" ],                        // All generated itemstacks will show up in the general tab
    "decorative": [ "c-copper", "a-a1::b-b2" ] // itemstacks with c = copper, and itemstacks with
                                               // a = a1 and b = b2 will show up in the decorative tab
}

allowedvariants

This property performs the same functionality as the base game's AllowedVariants property, but uses attribute-based matching syntax instead. It can be used to only allow variants that match any entry in the list. Example:

"allowedvariants": [
    "a-a1::b-b2::c-*", // any variant with a = a1, b = b2 and c any value
    "a-a2::b-b2::c-*", // any variant with a = a2, b = b2 and c any value
    "c-iron"           // any variant with c = iron
]

skipvariants

This property performs the same functionality as the base game's SkipVariants property, but uses attribute-based matching syntax instead. It can be used to exclude variants that match any entry in the list. Example:

"skipvariants": [
    "c-steel",  // any variant with c = steel excluded
    "c-gold",   // any variant with c = gold excluded
    "c-bismuth" // any variant with c = bismuth excluded
]

Clone this wiki locally