ItemModelTreeWalker

public final class ItemModelTreeWalker

Recursive walker over a Java 1.21.4+ items-definition model tree, producing one ResolvedLeaf per terminal minecraft:model leaf reached.

Mirrors the switch structure in Rainbow's BedrockItemMapper.java:113-219, but operates on raw JSON instead of Mojang's ItemModel.Unbaked types (which RSPM can't access from a Bukkit plugin). Each leaf carries the ordered list of predicates accumulated along its branch — those become the Geyser definition entry's predicate array at emission time (Phase 7).

The AssetResolver parameter is currently unused but threaded through the public API so later phases can resolve referenced models (e.g. nested item-defs) without an API change.

Functions

Link copied to clipboard
public static List<ResolvedLeaf> walk(ItemsDefinition def, AssetResolver resolver)