Creative visibility
Omitting the creative category means Hidden.
On this page
Overview
Omitting the creative category means Hidden. The item exists in the registry, is available through /give and works in gameplay, but is not added to the creative inventory. Presence in creative should not be your only registration check.
| Semantic category | Builder |
|---|---|
| Hidden | .Creative(content.Hidden) |
| Construction | .Creative(content.Construction) |
| Nature | .Creative(content.Nature) |
| Equipment | .Creative(content.Equipment) |
| Items | .Creative(content.Items) |
item := content.Item("example:token").Icon("token").Creative(content.Items)
block := content.Block("example:stone").Texture("stone").
WithItem().Creative(content.Construction)
An item's category directly declares its visibility. A block's category is a convenience for its automatic block item: without WithItem, it creates neither an item nor a creative entry.
Override precedence
A nil CreativeCategory on an associated item means inheritance; a pointer to Hidden is an explicit override. Omission therefore differs from explicitly supplying the zero enum value:
hidden := content.Hidden
block := content.Block("example:hidden_stone").Texture("stone").
Creative(content.Construction).
WithItemDefinition(content.BlockItemDefinition{
CreativeCategory: &hidden,
})
This item is hidden despite the block's Construction convenience category. The normalized block menu is hidden too. Conversely, an omitted block category with an item override of Items creates a visible associated item.
Do not register a generated block item again to change its category. Set an override in WithItemDefinition before Register. Fluent creative call order does not alter precedence: the host resolves it after successful Load.
Implementation boundary
Plugins specify no numeric client category, creative network ID, group index or packet. The host maps categories to current ProtocolNext values and includes only non-hidden typed items in the server's frozen creative projection. The item registry still contains hidden definitions.
The current API has no custom creative group names/order, group icons or arbitrary tabs. Do not infer those capabilities from CreativeCategory. Validation rejects unknown enum values.
Typed snapshot immutability and foreign-owner exclusion are tested in published_content_test.go; category lowering and codec round trips are tested in lower_test.go. These checks verify the server/wire contract. Actual entry placement and rendering require a live client smoke test.
Next: items, blocks, multi-version.
Documentation source
Snapshot from Pulce 4fc8a1bb. This page is generated from committed Markdown; code examples are preserved unchanged.