MappedItemRegistry
Accumulates Geyser definition entries across the generic Java→Bedrock pipeline. One instance per BedrockConversion.generate call.
Deduplication rules:
- registerModelOnce returns true exactly once per unique
bedrockSafeIdentifier— the orchestrator must write geometry/texture files only on the first call. - addMapping first dedupes by the tuple
(baseItem, bedrockIdentifier, predicateShape)— two leaves under the same base item that resolve to the same model with the same predicate stack are skipped silently (Geyser rejects duplicate identifiers outright). - It then dedupes by Geyser's conflict identity (base item + emitted
model+ parsed predicate set). Geyser registers only one definition per identity and logs "both entries have the same predicates" for the rest, so emitting both would just pick a random winner at boot. Sources of such pairs: two merged packs claiming the same custom_model_data on one item with different models, duplicate thresholds/overrides inside a single pack, and dual-format packs whose modern items definition and legacy override describe the same matcher. Winner policy: a moderntype=definitionentry beats atype=legacyone (modern is what current Java clients render); between entries of the same type the last one wins, matching vanilla's pick among duplicate thresholds/overrides. Dropped pairs are reported via dedupNotes for the caller's one-line summary.
The safeIdentifier rule matches Rainbow's Rainbow.bedrockSafeIdentifier (Rainbow.java:18-20): ':' ->'.', '/' ->'_'. Used for filesystem paths and the item_texture.json lookup key.
Functions
Link copied to clipboard
Link copied to clipboard
Same-predicate pairs collapsed by addMapping, one human-readable note per pair, in emission order.
Link copied to clipboard
Link copied to clipboard
Canonical, deterministic signature of a predicate stack.
Link copied to clipboard
Link copied to clipboard
Rainbow-style identifier sanitisation (mirrors
Rainbow.bedrockSafeIdentifier): ':' becomes '.', '/' becomes '_'.Link copied to clipboard
Link copied to clipboard