@jsprismarine/mapping 0.23.0-unstable-20261121073620 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @jsprismarine/mapping
2
2
 
3
- ## 0.23.0-unstable-20261121073620
3
+ ## 0.23.0
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -17,9 +17,9 @@
17
17
  - [#3288](https://github.com/JSPrismarine/JSPrismarine/pull/3288) [`4d92994`](https://github.com/JSPrismarine/JSPrismarine/commit/4d929943617a9cd77d55fb8b2cdd6343665152b4) Thanks [@filiphsps](https://github.com/filiphsps)! - The package ships tables for the Java preview, `26.4-snapshot-10`, mapped onto Bedrock preview protocol 2259. Every block, item, entity type, biome, mob effect and potion 26.4 adds has a 2259 counterpart, so the preview adds no losses. `BedrockBiomeLoss` takes an optional `javaSince`, the first pinned Java release with a biome for it: `minecraft:ice_caves` is a loss in the 26.3 tables and mapped in the preview's. The package's exports still read the default release's tables.
18
18
 
19
19
  - [#3288](https://github.com/JSPrismarine/JSPrismarine/pull/3288) [`c1f1339`](https://github.com/JSPrismarine/JSPrismarine/commit/c1f1339aea746b7a86016ba68739517049d8967e) Thanks [@filiphsps](https://github.com/filiphsps)! - The generated tables moved under the release directory, `src/tables/<release>/`, beside a `pair.json` naming the Bedrock protocol they map onto. `generate:tables`, `generate:block-states` and `generate:block-properties` take `--java <release>`. The package's exports are unchanged and read the default release's tables.
20
- - Updated dependencies [[`60edd7a`](https://github.com/JSPrismarine/JSPrismarine/commit/60edd7a1234650367fe5c2406ee402641be33ed9), [`bf419b8`](https://github.com/JSPrismarine/JSPrismarine/commit/bf419b82bfea52c095ca09b02c1c4ac955ac1d0a), [`c8e1685`](https://github.com/JSPrismarine/JSPrismarine/commit/c8e1685ae8316255d39674af9d00ac8d778f674d), [`b41035b`](https://github.com/JSPrismarine/JSPrismarine/commit/b41035be9b61570008b3405aa169418b19081915), [`4bda824`](https://github.com/JSPrismarine/JSPrismarine/commit/4bda8241a8631da2d205133c85fd361871d6cf61), [`7e2e6f3`](https://github.com/JSPrismarine/JSPrismarine/commit/7e2e6f3cff1f20a11a3f59aac94c68a33fa71a35), [`3e71a8d`](https://github.com/JSPrismarine/JSPrismarine/commit/3e71a8dd75bd0a97e0f8587666f60f160844ff0b), [`586269e`](https://github.com/JSPrismarine/JSPrismarine/commit/586269e324cddfe57caf4206f387895cda6d479f), [`5d2fb0e`](https://github.com/JSPrismarine/JSPrismarine/commit/5d2fb0eb3730e59260a09e60c130e57e5fdb099c), [`936970c`](https://github.com/JSPrismarine/JSPrismarine/commit/936970c04f98b392e4b753f3c89224da3d03cb49), [`57caf26`](https://github.com/JSPrismarine/JSPrismarine/commit/57caf2632f92e5da55ce6eedc4eb0be3d66190d4), [`4b590cf`](https://github.com/JSPrismarine/JSPrismarine/commit/4b590cf6c529d17d8df20d8eab9b2157dc213a19), [`349a814`](https://github.com/JSPrismarine/JSPrismarine/commit/349a81448bfc8be2f901efe14527b8c9334f11eb), [`8876fae`](https://github.com/JSPrismarine/JSPrismarine/commit/8876faec0d0cbd4232446e5081338461e420450e), [`b29c5de`](https://github.com/JSPrismarine/JSPrismarine/commit/b29c5deca0848f515161b10344af46b7a2d8b430), [`56200a6`](https://github.com/JSPrismarine/JSPrismarine/commit/56200a61535d916f0c41a11d077752b194e4c08b), [`c500335`](https://github.com/JSPrismarine/JSPrismarine/commit/c5003358e3a7199593c6ddcdbe4bdf63f8c29fac), [`e090dd7`](https://github.com/JSPrismarine/JSPrismarine/commit/e090dd75379edbfc415d84925e48af29aaa4864e), [`6e758f9`](https://github.com/JSPrismarine/JSPrismarine/commit/6e758f9de80c357c12d992bf473f1bdac86fb274), [`93a1b61`](https://github.com/JSPrismarine/JSPrismarine/commit/93a1b610493f401c4ac62881f70b3dee8c882f33), [`e1c982e`](https://github.com/JSPrismarine/JSPrismarine/commit/e1c982eeed0dfd682b5680c45c69159e21fd9ec0), [`9579362`](https://github.com/JSPrismarine/JSPrismarine/commit/9579362b4070e246d6300d2f4e2dca2ab4715124), [`f18ef7c`](https://github.com/JSPrismarine/JSPrismarine/commit/f18ef7c595f58a267b5371baab96390d0282616d), [`cf88d2f`](https://github.com/JSPrismarine/JSPrismarine/commit/cf88d2f8c2184bd4e116db888d4528fa27f5338d), [`d6c69e4`](https://github.com/JSPrismarine/JSPrismarine/commit/d6c69e43051eb091f0b4a17c0f33799f5944caf3), [`0792e2a`](https://github.com/JSPrismarine/JSPrismarine/commit/0792e2a7e6e5e98729b80df412262fd549ea3cb9), [`1c3be54`](https://github.com/JSPrismarine/JSPrismarine/commit/1c3be5465a2865072ac0f16b4848ee0cd9b6b13a), [`db04d85`](https://github.com/JSPrismarine/JSPrismarine/commit/db04d8520c1d43b88196c14229f36f5c8e71f3c1)]:
21
- - @jsprismarine/errors@0.23.0-unstable-20261121073620
22
- - @jsprismarine/minecraft@0.23.0-unstable-20261121073620
20
+ - Updated dependencies [[`60edd7a`](https://github.com/JSPrismarine/JSPrismarine/commit/60edd7a1234650367fe5c2406ee402641be33ed9), [`bf419b8`](https://github.com/JSPrismarine/JSPrismarine/commit/bf419b82bfea52c095ca09b02c1c4ac955ac1d0a), [`c8e1685`](https://github.com/JSPrismarine/JSPrismarine/commit/c8e1685ae8316255d39674af9d00ac8d778f674d), [`b41035b`](https://github.com/JSPrismarine/JSPrismarine/commit/b41035be9b61570008b3405aa169418b19081915), [`4bda824`](https://github.com/JSPrismarine/JSPrismarine/commit/4bda8241a8631da2d205133c85fd361871d6cf61), [`7e2e6f3`](https://github.com/JSPrismarine/JSPrismarine/commit/7e2e6f3cff1f20a11a3f59aac94c68a33fa71a35), [`3e71a8d`](https://github.com/JSPrismarine/JSPrismarine/commit/3e71a8dd75bd0a97e0f8587666f60f160844ff0b), [`586269e`](https://github.com/JSPrismarine/JSPrismarine/commit/586269e324cddfe57caf4206f387895cda6d479f), [`5d2fb0e`](https://github.com/JSPrismarine/JSPrismarine/commit/5d2fb0eb3730e59260a09e60c130e57e5fdb099c), [`936970c`](https://github.com/JSPrismarine/JSPrismarine/commit/936970c04f98b392e4b753f3c89224da3d03cb49), [`57caf26`](https://github.com/JSPrismarine/JSPrismarine/commit/57caf2632f92e5da55ce6eedc4eb0be3d66190d4), [`4b590cf`](https://github.com/JSPrismarine/JSPrismarine/commit/4b590cf6c529d17d8df20d8eab9b2157dc213a19), [`349a814`](https://github.com/JSPrismarine/JSPrismarine/commit/349a81448bfc8be2f901efe14527b8c9334f11eb), [`b29c5de`](https://github.com/JSPrismarine/JSPrismarine/commit/b29c5deca0848f515161b10344af46b7a2d8b430), [`56200a6`](https://github.com/JSPrismarine/JSPrismarine/commit/56200a61535d916f0c41a11d077752b194e4c08b), [`c500335`](https://github.com/JSPrismarine/JSPrismarine/commit/c5003358e3a7199593c6ddcdbe4bdf63f8c29fac), [`e090dd7`](https://github.com/JSPrismarine/JSPrismarine/commit/e090dd75379edbfc415d84925e48af29aaa4864e), [`6e758f9`](https://github.com/JSPrismarine/JSPrismarine/commit/6e758f9de80c357c12d992bf473f1bdac86fb274), [`93a1b61`](https://github.com/JSPrismarine/JSPrismarine/commit/93a1b610493f401c4ac62881f70b3dee8c882f33), [`e1c982e`](https://github.com/JSPrismarine/JSPrismarine/commit/e1c982eeed0dfd682b5680c45c69159e21fd9ec0), [`9579362`](https://github.com/JSPrismarine/JSPrismarine/commit/9579362b4070e246d6300d2f4e2dca2ab4715124), [`f18ef7c`](https://github.com/JSPrismarine/JSPrismarine/commit/f18ef7c595f58a267b5371baab96390d0282616d), [`cf88d2f`](https://github.com/JSPrismarine/JSPrismarine/commit/cf88d2f8c2184bd4e116db888d4528fa27f5338d), [`d6c69e4`](https://github.com/JSPrismarine/JSPrismarine/commit/d6c69e43051eb091f0b4a17c0f33799f5944caf3), [`0792e2a`](https://github.com/JSPrismarine/JSPrismarine/commit/0792e2a7e6e5e98729b80df412262fd549ea3cb9), [`1c3be54`](https://github.com/JSPrismarine/JSPrismarine/commit/1c3be5465a2865072ac0f16b4848ee0cd9b6b13a), [`db04d85`](https://github.com/JSPrismarine/JSPrismarine/commit/db04d8520c1d43b88196c14229f36f5c8e71f3c1)]:
21
+ - @jsprismarine/errors@0.23.0
22
+ - @jsprismarine/minecraft@0.23.0
23
23
 
24
24
  ## 0.22.0
25
25
 
@@ -80,7 +80,7 @@ export type JavaMappingResult =
80
80
  * alphabetical Java block order, at the value Java's default state gives each property Bedrock
81
81
  * dropped. A waterlogged slab comes back dry, because Bedrock holds the water in a layer of its
82
82
  * own and nothing in the state can say otherwise. That is the information
83
- * {@link import('./lossList').DROPPED_BLOCK_PROPERTIES} records as lost.
83
+ * {@link DROPPED_BLOCK_PROPERTIES} records as lost.
84
84
  *
85
85
  * @param {string} bedrockId - The namespaced Bedrock block identifier.
86
86
  * @param {Readonly<Record<string, BlockStateValue>>} [states] - The state values as the palette
@@ -194,7 +194,7 @@ var offsetOf = (block, states) => {
194
194
  * alphabetical Java block order, at the value Java's default state gives each property Bedrock
195
195
  * dropped. A waterlogged slab comes back dry, because Bedrock holds the water in a layer of its
196
196
  * own and nothing in the state can say otherwise. That is the information
197
- * {@link import('./lossList').DROPPED_BLOCK_PROPERTIES} records as lost.
197
+ * {@link DROPPED_BLOCK_PROPERTIES} records as lost.
198
198
  *
199
199
  * @param {string} bedrockId - The namespaced Bedrock block identifier.
200
200
  * @param {Readonly<Record<string, BlockStateValue>>} [states] - The state values as the palette
@@ -1 +1 @@
1
- {"version":3,"file":"blockMapping.js","names":[],"sources":["../src/blockMapping.ts"],"sourcesContent":["import type { BlockStateValue } from './blockStates';\nimport type { BlockLoss } from './lossList';\nimport { BLOCK_LOSSES } from './lossList';\nimport { blocksTable } from './tables';\n\n/** One Bedrock block state: the identifier and the exact state set its palette entry declares. */\nexport interface BedrockBlockState {\n /** The namespaced Bedrock block identifier. */\n readonly name: string;\n /** The Bedrock state values, exactly the keys the pinned palette declares for the identifier. */\n readonly states: Readonly<Record<string, string | number>>;\n}\n\n/** What a Java block state lookup produced. */\nexport type BlockMappingResult =\n /** A real Bedrock palette state with nothing lost at the block level. */\n | { readonly kind: 'mapped'; readonly bedrock: BedrockBlockState }\n /** A reviewed loss: the Java block has no Bedrock concept, and `bedrock` is its listed fallback. */\n | { readonly kind: 'loss'; readonly loss: BlockLoss; readonly bedrock: BedrockBlockState }\n /** A non-`minecraft:` identifier, passed through untouched for custom content. */\n | { readonly kind: 'passthrough'; readonly bedrock: BedrockBlockState }\n /** Not a Java 26.3 block state: an unknown identifier, property or value. */\n | { readonly kind: 'unknown'; readonly javaId: string };\n\n/** The pinned version pair and GeyserMC/mappings commit the tables were generated from. */\nexport const MAPPING_VERSIONS = {\n javaVersion: blocksTable.javaVersion,\n bedrockVersion: blocksTable.bedrockVersion,\n geyserMappingsCommit: blocksTable.geyserMappingsCommit\n} as const;\n\nconst palette: BedrockBlockState[] = blocksTable.statePalette.flatMap(([name, keys, tuples]) =>\n tuples.map((values) => ({\n name: `minecraft:${name}`,\n states: Object.freeze(Object.fromEntries(keys.map((key, axis) => [key, values[axis] ?? ''])))\n }))\n);\n\nconst expandedTargets = new Map<string, Uint16Array>();\nconst targetsOf = (javaId: string): Uint16Array => {\n let expanded = expandedTargets.get(javaId);\n if (expanded === undefined) {\n const runs = blocksTable.blocks[javaId]?.targets ?? [];\n const flat: number[] = [];\n for (const run of runs) {\n if (typeof run === 'number') flat.push(run);\n else for (let count = 0; count < run[1]; count++) flat.push(run[0]);\n }\n expanded = Uint16Array.from(flat);\n expandedTargets.set(javaId, expanded);\n }\n return expanded;\n};\n\nconst blockLossById = new Map<string, BlockLoss>(BLOCK_LOSSES.map((loss) => [loss.javaId, loss]));\n\n/**\n * Maps one Java 26.3 block state to its palette state in the pinned Bedrock release. Total\n * over all 35723 Java states: every valid state returns `mapped` or a\n * reviewed `loss`, never `undefined`.\n *\n * Omitted properties take the block's default state values, as Java does.\n * Non-`minecraft:` identifiers pass through untouched. Anything that is not\n * a Java block state at the pinned version returns `unknown`.\n */\nexport const javaBlockStateToBedrock = (\n javaId: string,\n properties?: Readonly<Record<string, string>>\n): BlockMappingResult => {\n if (!javaId.startsWith('minecraft:')) {\n return { kind: 'passthrough', bedrock: { name: javaId, states: { ...(properties ?? {}) } } };\n }\n const block = blocksTable.blocks[javaId];\n if (block === undefined) return { kind: 'unknown', javaId };\n\n const axes = Object.entries(block.properties ?? {});\n let index = 0;\n let defaultRemainder = block.default;\n // Walk the axes most significant first; the default state supplies any\n // omitted value, decomposed from the default state's in-block index.\n let defaultDivisor = axes.reduce((product, [, values]) => product * values.length, 1);\n for (const [property, values] of axes) {\n defaultDivisor /= values.length;\n const defaultValueIndex = Math.floor(defaultRemainder / defaultDivisor);\n defaultRemainder %= defaultDivisor;\n const provided = properties?.[property];\n const valueIndex = provided === undefined ? defaultValueIndex : values.indexOf(provided);\n if (valueIndex < 0) return { kind: 'unknown', javaId };\n index = index * values.length + valueIndex;\n }\n for (const property of Object.keys(properties ?? {})) {\n if (!axes.some(([name]) => name === property)) return { kind: 'unknown', javaId };\n }\n\n const bedrock = palette[targetsOf(javaId)[index] ?? -1];\n if (bedrock === undefined) return { kind: 'unknown', javaId };\n const loss = blockLossById.get(javaId);\n if (loss !== undefined) return { kind: 'loss', loss, bedrock };\n return { kind: 'mapped', bedrock };\n};\n\n/** The number of distinct Bedrock states the Java palette reaches; exposed for the parity dashboard. */\nexport const BEDROCK_TARGET_STATE_COUNT = palette.length;\n\n/** One Java 26.3 block state: the identifier and a value for every property the block declares. */\nexport interface JavaBlockState {\n /** The namespaced Java block identifier, such as `minecraft:black_concrete_slab`. */\n readonly name: string;\n /** Every property the Java block declares, each at the value this state names. */\n readonly properties: Readonly<Record<string, string>>;\n}\n\n/** What a Bedrock block state lookup produced. */\nexport type JavaMappingResult =\n /** A Java 26.3 block state that maps onto the Bedrock state asked about. */\n | { readonly kind: 'mapped'; readonly java: JavaBlockState }\n /** A Bedrock identifier no Java block state reaches, which is every Bedrock-only block. */\n | { readonly kind: 'unknown'; readonly bedrockId: string };\n\n/** Where one Bedrock identifier's states sit in {@link palette}, and how its palette entry spells them. */\ninterface PaletteBlock {\n /** Index into {@link palette} of the identifier's first state. */\n readonly first: number;\n /** The state names, in the order the value tuples list them. */\n readonly keys: readonly string[];\n /** One value tuple per state of the identifier. */\n readonly tuples: readonly (readonly (string | number)[])[];\n}\n\n// Walks `statePalette` in the order `palette` flattened it, so `first` indexes the same array.\nconst paletteBlocks = new Map<string, PaletteBlock>();\nlet paletteCursor = 0;\nfor (const [name, keys, tuples] of blocksTable.statePalette) {\n paletteBlocks.set(`minecraft:${name}`, { first: paletteCursor, keys, tuples });\n paletteCursor += tuples.length;\n}\n\n/** The Java sources of every palette state, built on first use because most servers never ask. */\ninterface JavaSources {\n /** Java block ids in table order, which is alphabetical; the arrays below index this. */\n readonly javaIds: readonly string[];\n /** Per palette state, the index into `javaIds` of the Java block that reaches it, or -1. */\n readonly blocks: Int16Array;\n /** Per palette state, the in-block state index of the Java state that reaches it. */\n readonly states: Uint16Array;\n /** Per Bedrock identifier, every Java block any of its states maps from, in `javaIds` order. */\n readonly byBedrock: ReadonlyMap<string, readonly string[]>;\n}\n\nlet javaSources: JavaSources | undefined;\n\n/** The number of axes an in-block state index spells the same way the block's default state does. */\nconst defaultAgreement = (state: number, sizes: readonly number[], defaults: readonly number[]): number => {\n let agreed = 0;\n let remainder = state;\n for (let axis = sizes.length - 1; axis >= 0; axis--) {\n const size = sizes[axis]!;\n if (remainder % size === defaults[axis]) agreed++;\n remainder = Math.floor(remainder / size);\n }\n return agreed;\n};\n\n/** The per-axis value indices of one in-block state index. */\nconst axisIndices = (state: number, sizes: readonly number[]): number[] => {\n const indices = new Array<number>(sizes.length);\n let remainder = state;\n for (let axis = sizes.length - 1; axis >= 0; axis--) {\n const size = sizes[axis]!;\n indices[axis] = remainder % size;\n remainder = Math.floor(remainder / size);\n }\n return indices;\n};\n\n/**\n * Inverts the whole block table in one pass.\n *\n * Several Java states can land on one Bedrock state, because Bedrock drops properties Java\n * carries: a waterlogged slab and a dry one are one Bedrock block, since Bedrock puts the water\n * in a layer of its own. Two rules pick which of them the inverse reports. The first Java block\n * in table order claims the state, which makes the answer alphabetical rather than dependent on\n * when a caller asked. Within that block, the state agreeing with Java's default on the most\n * axes wins, so a dropped property comes back at the value Java would have filled in for a\n * caller who left it out.\n */\nconst sourcesOf = (): JavaSources => {\n if (javaSources !== undefined) return javaSources;\n\n const javaIds = Object.keys(blocksTable.blocks);\n const blocks = new Int16Array(palette.length).fill(-1);\n const states = new Uint16Array(palette.length);\n const agreements = new Int8Array(palette.length);\n const byBedrock = new Map<string, string[]>();\n\n for (let block = 0; block < javaIds.length; block++) {\n const javaId = javaIds[block]!;\n const entry = blocksTable.blocks[javaId]!;\n const sizes = Object.values(entry.properties ?? {}).map((values) => values.length);\n const defaults = axisIndices(entry.default, sizes);\n const targets = targetsOf(javaId);\n\n for (let state = 0; state < targets.length; state++) {\n const target = targets[state]!;\n const agreed = defaultAgreement(state, sizes, defaults);\n if (blocks[target] === -1 || (blocks[target] === block && agreed > agreements[target]!)) {\n blocks[target] = block;\n states[target] = state;\n agreements[target] = agreed;\n }\n\n const bedrockId = palette[target]?.name;\n if (bedrockId === undefined) continue;\n const reached = byBedrock.get(bedrockId);\n if (reached === undefined) byBedrock.set(bedrockId, [javaId]);\n else if (reached[reached.length - 1] !== javaId) reached.push(javaId);\n }\n }\n\n javaSources = { javaIds, blocks, states, byBedrock };\n return javaSources;\n};\n\n/** Decomposes an in-block state index back into the property values the forward direction composed it from. */\nconst propertiesOf = (javaId: string, state: number): Record<string, string> => {\n const axes = Object.entries(blocksTable.blocks[javaId]?.properties ?? {});\n const indices = axisIndices(\n state,\n axes.map(([, values]) => values.length)\n );\n return Object.fromEntries(axes.map(([property, values], axis) => [property, values[indices[axis]!]!]));\n};\n\n/** The offset into a Bedrock block's palette states that the given values name. */\nconst offsetOf = (block: PaletteBlock, states: Readonly<Record<string, BlockStateValue>> | undefined): number => {\n if (states === undefined) return 0;\n\n // The palette carries booleans as 0 and 1, so a caller holding `true` still matches.\n const wanted = block.keys.map((key) => {\n const value = states[key];\n return value === undefined ? undefined : String(typeof value === 'boolean' ? Number(value) : value);\n });\n const found = block.tuples.findIndex((tuple) =>\n wanted.every((value, axis) => value === undefined || value === String(tuple[axis]))\n );\n return found < 0 ? 0 : found;\n};\n\n/**\n * Maps one Bedrock block state back to the Java 26.3 state it came from, the inverse of\n * {@link javaBlockStateToBedrock}.\n *\n * The states matter, because Bedrock splits blocks Java keeps whole and keeps blocks Java\n * splits. A `minecraft:black_concrete_double_slab` is Java's `black_concrete_slab` at\n * `type=double`, and a `minecraft:torch` facing a wall is Java's `wall_torch` rather than its\n * `torch`. Nothing but the state can tell those apart.\n *\n * Where several Java states collapse onto one Bedrock state, the answer is the first in\n * alphabetical Java block order, at the value Java's default state gives each property Bedrock\n * dropped. A waterlogged slab comes back dry, because Bedrock holds the water in a layer of its\n * own and nothing in the state can say otherwise. That is the information\n * {@link import('./lossList').DROPPED_BLOCK_PROPERTIES} records as lost.\n *\n * @param {string} bedrockId - The namespaced Bedrock block identifier.\n * @param {Readonly<Record<string, BlockStateValue>>} [states] - The state values as the palette\n * holds them. A name the block does not carry is ignored, and a set of values that names no\n * state of the block falls back to the block's first palette state. Omitting them altogether\n * answers for that first state.\n * @returns {JavaMappingResult} The Java state, or `unknown` for an identifier no Java block reaches.\n * @example\n * ```typescript\n * bedrockBlockStateToJava('minecraft:black_concrete_double_slab');\n * // { kind: 'mapped', java: { name: 'minecraft:black_concrete_slab', properties: { type: 'double', waterlogged: 'false' } } }\n * ```\n */\nexport const bedrockBlockStateToJava = (\n bedrockId: string,\n states?: Readonly<Record<string, BlockStateValue>>\n): JavaMappingResult => {\n const block = paletteBlocks.get(bedrockId);\n if (block === undefined) return { kind: 'unknown', bedrockId };\n\n const sources = sourcesOf();\n const index = block.first + offsetOf(block, states);\n const known = mappedStates[index];\n if (known !== undefined) return known;\n\n const javaId = sources.javaIds[sources.blocks[index] ?? -1];\n if (javaId === undefined) return { kind: 'unknown', bedrockId };\n\n const java = Object.freeze({\n name: javaId,\n properties: Object.freeze(propertiesOf(javaId, sources.states[index]!))\n });\n const mapped = Object.freeze({ kind: 'mapped' as const, java });\n mappedStates[index] = mapped;\n return mapped;\n};\n\n/**\n * Each palette state's answer from {@link bedrockBlockStateToJava}, frozen and shared. A fluid\n * search or a tag check asks about the same few states thousands of times a tick, and the answer\n * for a palette index never changes.\n */\nconst mappedStates: JavaMappingResult[] = [];\n\n/**\n * Every Java 26.3 block that some state of a Bedrock block maps from, in alphabetical order.\n *\n * The list has more than one member wherever Java splits a block Bedrock keeps whole: Bedrock's\n * one `minecraft:torch` answers `minecraft:torch` and `minecraft:wall_torch`, and its one\n * `minecraft:air` answers all three of Java's air blocks. Use it when a per-state answer is not\n * enough, such as finding the one Java block of the set that a datapack registered something for.\n *\n * @param {string} bedrockId - The namespaced Bedrock block identifier.\n * @returns {readonly string[]} The Java block ids, empty for a Bedrock-only block.\n * @example\n * ```typescript\n * bedrockBlockToJava('minecraft:torch'); // ['minecraft:torch', 'minecraft:wall_torch']\n * ```\n */\nexport const bedrockBlockToJava = (bedrockId: string): readonly string[] => sourcesOf().byBedrock.get(bedrockId) ?? [];\n"],"mappings":";;;;AAyBA,IAAa,mBAAmB;CAC5B,aAAa,YAAY;CACzB,gBAAgB,YAAY;CAC5B,sBAAsB,YAAY;AACtC;AAEA,IAAM,UAA+B,YAAY,aAAa,SAAS,CAAC,MAAM,MAAM,YAChF,OAAO,KAAK,YAAY;CACpB,MAAM,aAAa;CACnB,QAAQ,OAAO,OAAO,OAAO,YAAY,KAAK,KAAK,KAAK,SAAS,CAAC,KAAK,OAAO,SAAS,EAAE,CAAC,CAAC,CAAC;AAChG,EAAE,CACN;AAEA,IAAM,kCAAkB,IAAI,IAAyB;AACrD,IAAM,aAAa,WAAgC;CAC/C,IAAI,WAAW,gBAAgB,IAAI,MAAM;CACzC,IAAI,aAAa,KAAA,GAAW;EACxB,M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IAAI,SAAS,KAAK,CAAC"}
1
+ {"version":3,"file":"blockMapping.js","names":[],"sources":["../src/blockMapping.ts"],"sourcesContent":["import type { BlockStateValue } from './blockStates';\nimport type { BlockLoss } from './lossList';\nimport { BLOCK_LOSSES } from './lossList';\nimport { blocksTable } from './tables';\n\n/** One Bedrock block state: the identifier and the exact state set its palette entry declares. */\nexport interface BedrockBlockState {\n /** The namespaced Bedrock block identifier. */\n readonly name: string;\n /** The Bedrock state values, exactly the keys the pinned palette declares for the identifier. */\n readonly states: Readonly<Record<string, string | number>>;\n}\n\n/** What a Java block state lookup produced. */\nexport type BlockMappingResult =\n /** A real Bedrock palette state with nothing lost at the block level. */\n | { readonly kind: 'mapped'; readonly bedrock: BedrockBlockState }\n /** A reviewed loss: the Java block has no Bedrock concept, and `bedrock` is its listed fallback. */\n | { readonly kind: 'loss'; readonly loss: BlockLoss; readonly bedrock: BedrockBlockState }\n /** A non-`minecraft:` identifier, passed through untouched for custom content. */\n | { readonly kind: 'passthrough'; readonly bedrock: BedrockBlockState }\n /** Not a Java 26.3 block state: an unknown identifier, property or value. */\n | { readonly kind: 'unknown'; readonly javaId: string };\n\n/** The pinned version pair and GeyserMC/mappings commit the tables were generated from. */\nexport const MAPPING_VERSIONS = {\n javaVersion: blocksTable.javaVersion,\n bedrockVersion: blocksTable.bedrockVersion,\n geyserMappingsCommit: blocksTable.geyserMappingsCommit\n} as const;\n\nconst palette: BedrockBlockState[] = blocksTable.statePalette.flatMap(([name, keys, tuples]) =>\n tuples.map((values) => ({\n name: `minecraft:${name}`,\n states: Object.freeze(Object.fromEntries(keys.map((key, axis) => [key, values[axis] ?? ''])))\n }))\n);\n\nconst expandedTargets = new Map<string, Uint16Array>();\nconst targetsOf = (javaId: string): Uint16Array => {\n let expanded = expandedTargets.get(javaId);\n if (expanded === undefined) {\n const runs = blocksTable.blocks[javaId]?.targets ?? [];\n const flat: number[] = [];\n for (const run of runs) {\n if (typeof run === 'number') flat.push(run);\n else for (let count = 0; count < run[1]; count++) flat.push(run[0]);\n }\n expanded = Uint16Array.from(flat);\n expandedTargets.set(javaId, expanded);\n }\n return expanded;\n};\n\nconst blockLossById = new Map<string, BlockLoss>(BLOCK_LOSSES.map((loss) => [loss.javaId, loss]));\n\n/**\n * Maps one Java 26.3 block state to its palette state in the pinned Bedrock release. Total\n * over all 35723 Java states: every valid state returns `mapped` or a\n * reviewed `loss`, never `undefined`.\n *\n * Omitted properties take the block's default state values, as Java does.\n * Non-`minecraft:` identifiers pass through untouched. Anything that is not\n * a Java block state at the pinned version returns `unknown`.\n */\nexport const javaBlockStateToBedrock = (\n javaId: string,\n properties?: Readonly<Record<string, string>>\n): BlockMappingResult => {\n if (!javaId.startsWith('minecraft:')) {\n return { kind: 'passthrough', bedrock: { name: javaId, states: { ...(properties ?? {}) } } };\n }\n const block = blocksTable.blocks[javaId];\n if (block === undefined) return { kind: 'unknown', javaId };\n\n const axes = Object.entries(block.properties ?? {});\n let index = 0;\n let defaultRemainder = block.default;\n // Walk the axes most significant first; the default state supplies any\n // omitted value, decomposed from the default state's in-block index.\n let defaultDivisor = axes.reduce((product, [, values]) => product * values.length, 1);\n for (const [property, values] of axes) {\n defaultDivisor /= values.length;\n const defaultValueIndex = Math.floor(defaultRemainder / defaultDivisor);\n defaultRemainder %= defaultDivisor;\n const provided = properties?.[property];\n const valueIndex = provided === undefined ? defaultValueIndex : values.indexOf(provided);\n if (valueIndex < 0) return { kind: 'unknown', javaId };\n index = index * values.length + valueIndex;\n }\n for (const property of Object.keys(properties ?? {})) {\n if (!axes.some(([name]) => name === property)) return { kind: 'unknown', javaId };\n }\n\n const bedrock = palette[targetsOf(javaId)[index] ?? -1];\n if (bedrock === undefined) return { kind: 'unknown', javaId };\n const loss = blockLossById.get(javaId);\n if (loss !== undefined) return { kind: 'loss', loss, bedrock };\n return { kind: 'mapped', bedrock };\n};\n\n/** The number of distinct Bedrock states the Java palette reaches; exposed for the parity dashboard. */\nexport const BEDROCK_TARGET_STATE_COUNT = palette.length;\n\n/** One Java 26.3 block state: the identifier and a value for every property the block declares. */\nexport interface JavaBlockState {\n /** The namespaced Java block identifier, such as `minecraft:black_concrete_slab`. */\n readonly name: string;\n /** Every property the Java block declares, each at the value this state names. */\n readonly properties: Readonly<Record<string, string>>;\n}\n\n/** What a Bedrock block state lookup produced. */\nexport type JavaMappingResult =\n /** A Java 26.3 block state that maps onto the Bedrock state asked about. */\n | { readonly kind: 'mapped'; readonly java: JavaBlockState }\n /** A Bedrock identifier no Java block state reaches, which is every Bedrock-only block. */\n | { readonly kind: 'unknown'; readonly bedrockId: string };\n\n/** Where one Bedrock identifier's states sit in {@link palette}, and how its palette entry spells them. */\ninterface PaletteBlock {\n /** Index into {@link palette} of the identifier's first state. */\n readonly first: number;\n /** The state names, in the order the value tuples list them. */\n readonly keys: readonly string[];\n /** One value tuple per state of the identifier. */\n readonly tuples: readonly (readonly (string | number)[])[];\n}\n\n// Walks `statePalette` in the order `palette` flattened it, so `first` indexes the same array.\nconst paletteBlocks = new Map<string, PaletteBlock>();\nlet paletteCursor = 0;\nfor (const [name, keys, tuples] of blocksTable.statePalette) {\n paletteBlocks.set(`minecraft:${name}`, { first: paletteCursor, keys, tuples });\n paletteCursor += tuples.length;\n}\n\n/** The Java sources of every palette state, built on first use because most servers never ask. */\ninterface JavaSources {\n /** Java block ids in table order, which is alphabetical; the arrays below index this. */\n readonly javaIds: readonly string[];\n /** Per palette state, the index into `javaIds` of the Java block that reaches it, or -1. */\n readonly blocks: Int16Array;\n /** Per palette state, the in-block state index of the Java state that reaches it. */\n readonly states: Uint16Array;\n /** Per Bedrock identifier, every Java block any of its states maps from, in `javaIds` order. */\n readonly byBedrock: ReadonlyMap<string, readonly string[]>;\n}\n\nlet javaSources: JavaSources | undefined;\n\n/** The number of axes an in-block state index spells the same way the block's default state does. */\nconst defaultAgreement = (state: number, sizes: readonly number[], defaults: readonly number[]): number => {\n let agreed = 0;\n let remainder = state;\n for (let axis = sizes.length - 1; axis >= 0; axis--) {\n const size = sizes[axis]!;\n if (remainder % size === defaults[axis]) agreed++;\n remainder = Math.floor(remainder / size);\n }\n return agreed;\n};\n\n/** The per-axis value indices of one in-block state index. */\nconst axisIndices = (state: number, sizes: readonly number[]): number[] => {\n const indices = new Array<number>(sizes.length);\n let remainder = state;\n for (let axis = sizes.length - 1; axis >= 0; axis--) {\n const size = sizes[axis]!;\n indices[axis] = remainder % size;\n remainder = Math.floor(remainder / size);\n }\n return indices;\n};\n\n/**\n * Inverts the whole block table in one pass.\n *\n * Several Java states can land on one Bedrock state, because Bedrock drops properties Java\n * carries: a waterlogged slab and a dry one are one Bedrock block, since Bedrock puts the water\n * in a layer of its own. Two rules pick which of them the inverse reports. The first Java block\n * in table order claims the state, which makes the answer alphabetical rather than dependent on\n * when a caller asked. Within that block, the state agreeing with Java's default on the most\n * axes wins, so a dropped property comes back at the value Java would have filled in for a\n * caller who left it out.\n */\nconst sourcesOf = (): JavaSources => {\n if (javaSources !== undefined) return javaSources;\n\n const javaIds = Object.keys(blocksTable.blocks);\n const blocks = new Int16Array(palette.length).fill(-1);\n const states = new Uint16Array(palette.length);\n const agreements = new Int8Array(palette.length);\n const byBedrock = new Map<string, string[]>();\n\n for (let block = 0; block < javaIds.length; block++) {\n const javaId = javaIds[block]!;\n const entry = blocksTable.blocks[javaId]!;\n const sizes = Object.values(entry.properties ?? {}).map((values) => values.length);\n const defaults = axisIndices(entry.default, sizes);\n const targets = targetsOf(javaId);\n\n for (let state = 0; state < targets.length; state++) {\n const target = targets[state]!;\n const agreed = defaultAgreement(state, sizes, defaults);\n if (blocks[target] === -1 || (blocks[target] === block && agreed > agreements[target]!)) {\n blocks[target] = block;\n states[target] = state;\n agreements[target] = agreed;\n }\n\n const bedrockId = palette[target]?.name;\n if (bedrockId === undefined) continue;\n const reached = byBedrock.get(bedrockId);\n if (reached === undefined) byBedrock.set(bedrockId, [javaId]);\n else if (reached[reached.length - 1] !== javaId) reached.push(javaId);\n }\n }\n\n javaSources = { javaIds, blocks, states, byBedrock };\n return javaSources;\n};\n\n/** Decomposes an in-block state index back into the property values the forward direction composed it from. */\nconst propertiesOf = (javaId: string, state: number): Record<string, string> => {\n const axes = Object.entries(blocksTable.blocks[javaId]?.properties ?? {});\n const indices = axisIndices(\n state,\n axes.map(([, values]) => values.length)\n );\n return Object.fromEntries(axes.map(([property, values], axis) => [property, values[indices[axis]!]!]));\n};\n\n/** The offset into a Bedrock block's palette states that the given values name. */\nconst offsetOf = (block: PaletteBlock, states: Readonly<Record<string, BlockStateValue>> | undefined): number => {\n if (states === undefined) return 0;\n\n // The palette carries booleans as 0 and 1, so a caller holding `true` still matches.\n const wanted = block.keys.map((key) => {\n const value = states[key];\n return value === undefined ? undefined : String(typeof value === 'boolean' ? Number(value) : value);\n });\n const found = block.tuples.findIndex((tuple) =>\n wanted.every((value, axis) => value === undefined || value === String(tuple[axis]))\n );\n return found < 0 ? 0 : found;\n};\n\n/**\n * Maps one Bedrock block state back to the Java 26.3 state it came from, the inverse of\n * {@link javaBlockStateToBedrock}.\n *\n * The states matter, because Bedrock splits blocks Java keeps whole and keeps blocks Java\n * splits. A `minecraft:black_concrete_double_slab` is Java's `black_concrete_slab` at\n * `type=double`, and a `minecraft:torch` facing a wall is Java's `wall_torch` rather than its\n * `torch`. Nothing but the state can tell those apart.\n *\n * Where several Java states collapse onto one Bedrock state, the answer is the first in\n * alphabetical Java block order, at the value Java's default state gives each property Bedrock\n * dropped. A waterlogged slab comes back dry, because Bedrock holds the water in a layer of its\n * own and nothing in the state can say otherwise. That is the information\n * {@link DROPPED_BLOCK_PROPERTIES} records as lost.\n *\n * @param {string} bedrockId - The namespaced Bedrock block identifier.\n * @param {Readonly<Record<string, BlockStateValue>>} [states] - The state values as the palette\n * holds them. A name the block does not carry is ignored, and a set of values that names no\n * state of the block falls back to the block's first palette state. Omitting them altogether\n * answers for that first state.\n * @returns {JavaMappingResult} The Java state, or `unknown` for an identifier no Java block reaches.\n * @example\n * ```typescript\n * bedrockBlockStateToJava('minecraft:black_concrete_double_slab');\n * // { kind: 'mapped', java: { name: 'minecraft:black_concrete_slab', properties: { type: 'double', waterlogged: 'false' } } }\n * ```\n */\nexport const bedrockBlockStateToJava = (\n bedrockId: string,\n states?: Readonly<Record<string, BlockStateValue>>\n): JavaMappingResult => {\n const block = paletteBlocks.get(bedrockId);\n if (block === undefined) return { kind: 'unknown', bedrockId };\n\n const sources = sourcesOf();\n const index = block.first + offsetOf(block, states);\n const known = mappedStates[index];\n if (known !== undefined) return known;\n\n const javaId = sources.javaIds[sources.blocks[index] ?? -1];\n if (javaId === undefined) return { kind: 'unknown', bedrockId };\n\n const java = Object.freeze({\n name: javaId,\n properties: Object.freeze(propertiesOf(javaId, sources.states[index]!))\n });\n const mapped = Object.freeze({ kind: 'mapped' as const, java });\n mappedStates[index] = mapped;\n return mapped;\n};\n\n/**\n * Each palette state's answer from {@link bedrockBlockStateToJava}, frozen and shared. A fluid\n * search or a tag check asks about the same few states thousands of times a tick, and the answer\n * for a palette index never changes.\n */\nconst mappedStates: JavaMappingResult[] = [];\n\n/**\n * Every Java 26.3 block that some state of a Bedrock block maps from, in alphabetical order.\n *\n * The list has more than one member wherever Java splits a block Bedrock keeps whole: Bedrock's\n * one `minecraft:torch` answers `minecraft:torch` and `minecraft:wall_torch`, and its one\n * `minecraft:air` answers all three of Java's air blocks. Use it when a per-state answer is not\n * enough, such as finding the one Java block of the set that a datapack registered something for.\n *\n * @param {string} bedrockId - The namespaced Bedrock block identifier.\n * @returns {readonly string[]} The Java block ids, empty for a Bedrock-only block.\n * @example\n * ```typescript\n * bedrockBlockToJava('minecraft:torch'); // ['minecraft:torch', 'minecraft:wall_torch']\n * ```\n */\nexport const bedrockBlockToJava = (bedrockId: string): readonly string[] => sourcesOf().byBedrock.get(bedrockId) ?? [];\n"],"mappings":";;;;AAyBA,IAAa,mBAAmB;CAC5B,aAAa,YAAY;CACzB,gBAAgB,YAAY;CAC5B,sBAAsB,YAAY;AACtC;AAEA,IAAM,UAA+B,YAAY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MAAM;EAAW;CAAU;CAE9D,MAAM,OAAO,OAAO,OAAO;EACvB,MAAM;EACN,YAAY,OAAO,OAAO,aAAa,QAAQ,QAAQ,OAAO,MAAO,CAAC;CAC1E,CAAC;CACD,MAAM,SAAS,OAAO,OAAO;EAAE,MAAM;EAAmB;CAAK,CAAC;CAC9D,aAAa,SAAS;CACtB,OAAO;AACX;;;;;;AAOA,IAAM,eAAoC,CAAC;;;;;;;;;;;;;;;;AAiB3C,IAAa,sBAAsB,cAAyC,UAAU,CAAC,CAAC,UAAU,IAAI,SAAS,KAAK,CAAC"}
@@ -21,7 +21,8 @@ export interface BedrockBlockProperties {
21
21
  /** Fire's odds of consuming the block once lit. */
22
22
  readonly burnOdds: number;
23
23
  }
24
- interface Conflict {
24
+ /** One Bedrock block property its Java sources disagreed on, with the value kept and the one dropped. */
25
+ export interface Conflict {
25
26
  bedrock: string;
26
27
  field: string;
27
28
  kept: number | string | boolean;
@@ -48,7 +49,7 @@ export declare const BLOCK_PROPERTY_VERSIONS: {
48
49
  readonly bedrockVersion: string;
49
50
  };
50
51
  /** A Bedrock state value as the engine holds it; booleans travel as 0 and 1 in the palette. */
51
- type StateValue = string | number | boolean;
52
+ export type StateValue = string | number | boolean;
52
53
  /**
53
54
  * The Java-sourced properties of a Bedrock block state, or `undefined` for a block with no Java
54
55
  * source (see {@link BEDROCK_ONLY_BLOCKS}).
@@ -67,5 +68,4 @@ type StateValue = string | number | boolean;
67
68
  * ```
68
69
  */
69
70
  export declare const bedrockBlockPropertiesOf: (name: string, states?: Readonly<Record<string, StateValue>>) => BedrockBlockProperties | undefined;
70
- export {};
71
71
  //# sourceMappingURL=blockProperties.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blockProperties.d.ts","sources":["../src/blockProperties.ts"],"names":[],"mappings":"AAUA,8DAA8D;AAC9D,MAAM,WAAW,sBAAsB;IACnC,yFAAyF;IACzF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6EAA6E;I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,uBAAuB;aAChC,WAAW;aACX,cAAc;CACR,CAAC;AAEX,+FAA+F;AAC/F,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAYnD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,wBAAwB,SAC3B,MAAM,WACH,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,KAC9C,sBAAsB,GAAG,SAU3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"blockProperties.js","names":["blockPropertiesJson"],"sources":["../src/blockProperties.ts"],"sourcesContent":["/**\n * The Java-sourced per-state block property table, keyed by Bedrock block state - the server's\n * identity. Generated by `utils/generate/generate-block-properties.ts` from the Java 26.3 jar dump\n * golden, flattened through the block mapping: for each Bedrock state the table holds the property\n * row of the Java states that map onto it. Bedrock-only blocks with no Java source are listed in\n * {@link BEDROCK_ONLY_BLOCKS} and have no row; the engine keeps its own values for them. The\n * reviewed collapse disagreements are listed in {@link BLOCK_PROPERTY_CONFLICTS}.\n */\nimport blockPropertiesJson from './tables/26.3/blockProperties.json';\n\n/** The Java-sourced properties of one Bedrock block state. */\nexport interface BedrockBlockProperties {\n /** Java destroy time; `-1` marks the unbreakable blocks (bedrock, barriers, portals). */\n readonly hardness: number;\n /** Java explosion resistance; bedrock is 3600000, obsidian 1200, stone 6. */\n readonly blastResistance: number;\n /** Ground friction: 0.6 for almost everything, 0.98 for ice, 0.989 for blue ice. */\n readonly friction: number;\n /** Emitted light, 0 to 15. */\n readonly lightEmission: number;\n /** How much light the block swallows, 0 to 15. */\n readonly lightDampening: number;\n /** Whether breaking without the right tool yields nothing. */\n readonly requiresCorrectTool: boolean;\n /** Whether the block receives random ticks (crops grow, ice melts, fire spreads). */\n readonly randomTick: boolean;\n /** How a piston treats the block: `push_pull`, `immoveable`, `popped`, `block` or `ignore`. */\n readonly pushReaction: string;\n /** Fire's odds of igniting the block, 0 for the fireproof. */\n readonly igniteOdds: number;\n /** Fire's odds of consuming the block once lit. */\n readonly burnOdds: number;\n}\n\ninterface BlockRow {\n base: BedrockBlockProperties;\n stateOverrides?: Record<string, Partial<BedrockBlockProperties>>;\n}\n\ninterface Conflict {\n bedrock: string;\n field: string;\n kept: number | string | boolean;\n keptSource: string;\n other: number | string | boolean;\n otherSource: string;\n}\n\ninterface BlockPropertiesTable {\n javaVersion: string;\n bedrockVersion: string;\n blocks: Record<string, BlockRow>;\n bedrockOnly: string[];\n conflicts: Conflict[];\n}\n\n// The generated table is parsed JSON; the generator guarantees this shape.\nconst table = blockPropertiesJson as unknown as BlockPropertiesTable;\n\n/**\n * Bedrock palette blocks no Java block state maps onto: the Education Edition chemistry set, the\n * world-editing blocks (`allow`, `deny`, `border_block`), the deprecated palette entries and the\n * other Bedrock-only identifiers. The table has no row for them, so a lookup returns `undefined`\n * and the caller keeps its own values rather than receiving a silent default.\n */\nexport const BEDROCK_ONLY_BLOCKS: ReadonlySet<string> = new Set(table.bedrockOnly);\n\n/**\n * The reviewed flattening disagreements: Bedrock states whose Java sources did not agree on a\n * property, each kept value chosen by the rule the generator documents. All of them come from\n * Java properties Bedrock does not represent - piston extension, leaf distance, bamboo stage.\n */\nexport const BLOCK_PROPERTY_CONFLICTS: readonly Readonly<Conflict>[] = table.conflicts;\n\n/** The version pair the property table was flattened from. */\nexport const BLOCK_PROPERTY_VERSIONS = {\n javaVersion: table.javaVersion,\n bedrockVersion: table.bedrockVersion\n} as const;\n\n/** A Bedrock state value as the engine holds it; booleans travel as 0 and 1 in the palette. */\ntype StateValue = string | number | boolean;\n\nconst matches = (stateKey: string, states: Readonly<Record<string, StateValue>>): boolean =>\n stateKey.split(',').every((pair) => {\n const separator = pair.indexOf('=');\n const property = pair.slice(0, separator);\n const value = pair.slice(separator + 1);\n const held = states[property];\n if (held === undefined) return false;\n return String(typeof held === 'boolean' ? Number(held) : held) === value;\n });\n\n/**\n * The Java-sourced properties of a Bedrock block state, or `undefined` for a block with no Java\n * source (see {@link BEDROCK_ONLY_BLOCKS}).\n *\n * Without `states`, the answer is the block's base row: the value the majority of its states\n * share, which for every property but the handful of per-state overrides is the value of all of\n * them. With `states`, any override matching the given values is folded in - a lit candle's light,\n * an extended piston's missing base.\n * @param {string} name - The namespaced Bedrock block identifier, such as `minecraft:stone`.\n * @param {Readonly<Record<string, StateValue>>} [states] - The state's values, when the caller has them.\n * @returns {BedrockBlockProperties | undefined} The property row, or `undefined` with no Java source.\n * @example\n * ```typescript\n * bedrockBlockPropertiesOf('minecraft:blue_ice')?.friction; // 0.989\n * bedrockBlockPropertiesOf('minecraft:element_1'); // undefined\n * ```\n */\nexport const bedrockBlockPropertiesOf = (\n name: string,\n states?: Readonly<Record<string, StateValue>>\n): BedrockBlockProperties | undefined => {\n const row = table.blocks[name];\n if (row === undefined) return undefined;\n if (states === undefined || row.stateOverrides === undefined) return row.base;\n\n let merged = row.base;\n for (const [stateKey, override] of Object.entries(row.stateOverrides)) {\n if (matches(stateKey, states)) merged = { ...merged, ...override };\n }\n return merged;\n};\n"],"mappings":";;;;;;;;;;AAyDA,IAAM,QAAQA;;;;;;;AAQd,IAAa,sBAA2C,IAAI,IAAI,MAAM,WAAW;;;;;;AAOjF,IAAa,2BAA0D,MAAM;;AAG7E,IAAa,0BAA0B;CACnC,aAAa,MAAM;CACnB,gBAAgB,MAAM;AAC1B;AAKA,IAAM,WAAW,UAAkB,WAC/B,SAAS,MAAM,GAAG,CAAC,CAAC,OAAO,SAAS;CAChC,MAAM,YAAY,KAAK,QAAQ,GAAG;CAClC,MAAM,WAAW,KAAK,MAAM,GAAG,SAAS;CACxC,MAAM,QAAQ,KAAK,MAAM,YAAY,CAAC;CACtC,MAAM,OAAO,OAAO;CACpB,IAAI,SAAS,KAAA,GAAW,OAAO;CAC/B,OAAO,OAAO,OAAO,SAAS,YAAY,OAAO,IAAI,IAAI,IAAI,MAAM;AACvE,CAAC;;;;;;;;;;;;;;;;;;AAmBL,IAAa,4BACT,MACA,WACqC;CACrC,MAAM,MAAM,MAAM,OAAO;CACzB,IAAI,QAAQ,KAAA,GAAW,OAAO,KAAA;CAC9B,IAAI,WAAW,KAAA,KAAa,IAAI,mBAAmB,KAAA,GAAW,OAAO,IAAI;CAEzE,IAAI,SAAS,IAAI;CACjB,KAAK,MAAM,CAAC,UAAU,aAAa,OAAO,QAAQ,IAAI,cAAc,GAChE,IAAI,QAAQ,UAAU,MAAM,GAAG,SAAS;EAAE,GAAG;EAAQ,GAAG;CAAS;CAErE,OAAO;AACX"}
1
+ {"version":3,"file":"blockProperties.js","names":["blockPropertiesJson"],"sources":["../src/blockProperties.ts"],"sourcesContent":["/**\n * The Java-sourced per-state block property table, keyed by Bedrock block state - the server's\n * identity. Generated by `utils/generate/generate-block-properties.ts` from the Java 26.3 jar dump\n * golden, flattened through the block mapping: for each Bedrock state the table holds the property\n * row of the Java states that map onto it. Bedrock-only blocks with no Java source are listed in\n * {@link BEDROCK_ONLY_BLOCKS} and have no row; the engine keeps its own values for them. The\n * reviewed collapse disagreements are listed in {@link BLOCK_PROPERTY_CONFLICTS}.\n */\nimport blockPropertiesJson from './tables/26.3/blockProperties.json';\n\n/** The Java-sourced properties of one Bedrock block state. */\nexport interface BedrockBlockProperties {\n /** Java destroy time; `-1` marks the unbreakable blocks (bedrock, barriers, portals). */\n readonly hardness: number;\n /** Java explosion resistance; bedrock is 3600000, obsidian 1200, stone 6. */\n readonly blastResistance: number;\n /** Ground friction: 0.6 for almost everything, 0.98 for ice, 0.989 for blue ice. */\n readonly friction: number;\n /** Emitted light, 0 to 15. */\n readonly lightEmission: number;\n /** How much light the block swallows, 0 to 15. */\n readonly lightDampening: number;\n /** Whether breaking without the right tool yields nothing. */\n readonly requiresCorrectTool: boolean;\n /** Whether the block receives random ticks (crops grow, ice melts, fire spreads). */\n readonly randomTick: boolean;\n /** How a piston treats the block: `push_pull`, `immoveable`, `popped`, `block` or `ignore`. */\n readonly pushReaction: string;\n /** Fire's odds of igniting the block, 0 for the fireproof. */\n readonly igniteOdds: number;\n /** Fire's odds of consuming the block once lit. */\n readonly burnOdds: number;\n}\n\ninterface BlockRow {\n base: BedrockBlockProperties;\n stateOverrides?: Record<string, Partial<BedrockBlockProperties>>;\n}\n\n/** One Bedrock block property its Java sources disagreed on, with the value kept and the one dropped. */\nexport interface Conflict {\n bedrock: string;\n field: string;\n kept: number | string | boolean;\n keptSource: string;\n other: number | string | boolean;\n otherSource: string;\n}\n\ninterface BlockPropertiesTable {\n javaVersion: string;\n bedrockVersion: string;\n blocks: Record<string, BlockRow>;\n bedrockOnly: string[];\n conflicts: Conflict[];\n}\n\n// The generated table is parsed JSON; the generator guarantees this shape.\nconst table = blockPropertiesJson as unknown as BlockPropertiesTable;\n\n/**\n * Bedrock palette blocks no Java block state maps onto: the Education Edition chemistry set, the\n * world-editing blocks (`allow`, `deny`, `border_block`), the deprecated palette entries and the\n * other Bedrock-only identifiers. The table has no row for them, so a lookup returns `undefined`\n * and the caller keeps its own values rather than receiving a silent default.\n */\nexport const BEDROCK_ONLY_BLOCKS: ReadonlySet<string> = new Set(table.bedrockOnly);\n\n/**\n * The reviewed flattening disagreements: Bedrock states whose Java sources did not agree on a\n * property, each kept value chosen by the rule the generator documents. All of them come from\n * Java properties Bedrock does not represent - piston extension, leaf distance, bamboo stage.\n */\nexport const BLOCK_PROPERTY_CONFLICTS: readonly Readonly<Conflict>[] = table.conflicts;\n\n/** The version pair the property table was flattened from. */\nexport const BLOCK_PROPERTY_VERSIONS = {\n javaVersion: table.javaVersion,\n bedrockVersion: table.bedrockVersion\n} as const;\n\n/** A Bedrock state value as the engine holds it; booleans travel as 0 and 1 in the palette. */\nexport type StateValue = string | number | boolean;\n\nconst matches = (stateKey: string, states: Readonly<Record<string, StateValue>>): boolean =>\n stateKey.split(',').every((pair) => {\n const separator = pair.indexOf('=');\n const property = pair.slice(0, separator);\n const value = pair.slice(separator + 1);\n const held = states[property];\n if (held === undefined) return false;\n return String(typeof held === 'boolean' ? Number(held) : held) === value;\n });\n\n/**\n * The Java-sourced properties of a Bedrock block state, or `undefined` for a block with no Java\n * source (see {@link BEDROCK_ONLY_BLOCKS}).\n *\n * Without `states`, the answer is the block's base row: the value the majority of its states\n * share, which for every property but the handful of per-state overrides is the value of all of\n * them. With `states`, any override matching the given values is folded in - a lit candle's light,\n * an extended piston's missing base.\n * @param {string} name - The namespaced Bedrock block identifier, such as `minecraft:stone`.\n * @param {Readonly<Record<string, StateValue>>} [states] - The state's values, when the caller has them.\n * @returns {BedrockBlockProperties | undefined} The property row, or `undefined` with no Java source.\n * @example\n * ```typescript\n * bedrockBlockPropertiesOf('minecraft:blue_ice')?.friction; // 0.989\n * bedrockBlockPropertiesOf('minecraft:element_1'); // undefined\n * ```\n */\nexport const bedrockBlockPropertiesOf = (\n name: string,\n states?: Readonly<Record<string, StateValue>>\n): BedrockBlockProperties | undefined => {\n const row = table.blocks[name];\n if (row === undefined) return undefined;\n if (states === undefined || row.stateOverrides === undefined) return row.base;\n\n let merged = row.base;\n for (const [stateKey, override] of Object.entries(row.stateOverrides)) {\n if (matches(stateKey, states)) merged = { ...merged, ...override };\n }\n return merged;\n};\n"],"mappings":";;;;;;;;;;AA0DA,IAAM,QAAQA;;;;;;;AAQd,IAAa,sBAA2C,IAAI,IAAI,MAAM,WAAW;;;;;;AAOjF,IAAa,2BAA0D,MAAM;;AAG7E,IAAa,0BAA0B;CACnC,aAAa,MAAM;CACnB,gBAAgB,MAAM;AAC1B;AAKA,IAAM,WAAW,UAAkB,WAC/B,SAAS,MAAM,GAAG,CAAC,CAAC,OAAO,SAAS;CAChC,MAAM,YAAY,KAAK,QAAQ,GAAG;CAClC,MAAM,WAAW,KAAK,MAAM,GAAG,SAAS;CACxC,MAAM,QAAQ,KAAK,MAAM,YAAY,CAAC;CACtC,MAAM,OAAO,OAAO;CACpB,IAAI,SAAS,KAAA,GAAW,OAAO;CAC/B,OAAO,OAAO,OAAO,SAAS,YAAY,OAAO,IAAI,IAAI,IAAI,MAAM;AACvE,CAAC;;;;;;;;;;;;;;;;;;AAmBL,IAAa,4BACT,MACA,WACqC;CACrC,MAAM,MAAM,MAAM,OAAO;CACzB,IAAI,QAAQ,KAAA,GAAW,OAAO,KAAA;CAC9B,IAAI,WAAW,KAAA,KAAa,IAAI,mBAAmB,KAAA,GAAW,OAAO,IAAI;CAEzE,IAAI,SAAS,IAAI;CACjB,KAAK,MAAM,CAAC,UAAU,aAAa,OAAO,QAAQ,IAAI,cAAc,GAChE,IAAI,QAAQ,UAAU,MAAM,GAAG,SAAS;EAAE,GAAG;EAAQ,GAAG;CAAS;CAErE,OAAO;AACX"}
@@ -7,7 +7,7 @@ export type BlockStateValue = string | number | boolean;
7
7
  * this Bedrock block does not carry is dropped - Java's piston `extended` has no Bedrock state,
8
8
  * because an extended Bedrock piston is a piston with an arm block in front of it. A state the
9
9
  * block does carry and has no vocabulary for travels untouched, which is what a number, a
10
- * boolean, and the reviewed {@link import('./lossList').BLOCK_STATE_LOSSES} all want.
10
+ * boolean, and the reviewed {@link BLOCK_STATE_LOSSES} all want.
11
11
  *
12
12
  * @param {string} name - The namespaced Bedrock block identifier, such as `minecraft:piston`.
13
13
  * @param {Readonly<Record<string, BlockStateValue>>} states - The states, which may be spelled Java's way.
@@ -16,7 +16,7 @@ import { blockStatesTable, blocksTable } from "./tables.js";
16
16
  * block through {@link javaBlockStates}, works in words, and writes it back through
17
17
  * {@link bedrockBlockStates}. The round trip is exact for every state in the pinned palette; the
18
18
  * (block, state) pairs that have no word vocabulary at all are the reviewed
19
- * {@link import('./lossList').BLOCK_STATE_LOSSES} and travel as the Bedrock value untouched.
19
+ * {@link BLOCK_STATE_LOSSES} and travel as the Bedrock value untouched.
20
20
  */
21
21
  /** The state names each Bedrock block carries, from the block table's own target palette. */
22
22
  var keysOf = new Map(blocksTable.statePalette.map(([name, keys]) => [`minecraft:${name}`, new Set(keys)]));
@@ -44,7 +44,7 @@ var wordsOf = (name, state) => {
44
44
  * this Bedrock block does not carry is dropped - Java's piston `extended` has no Bedrock state,
45
45
  * because an extended Bedrock piston is a piston with an arm block in front of it. A state the
46
46
  * block does carry and has no vocabulary for travels untouched, which is what a number, a
47
- * boolean, and the reviewed {@link import('./lossList').BLOCK_STATE_LOSSES} all want.
47
+ * boolean, and the reviewed {@link BLOCK_STATE_LOSSES} all want.
48
48
  *
49
49
  * @param {string} name - The namespaced Bedrock block identifier, such as `minecraft:piston`.
50
50
  * @param {Readonly<Record<string, BlockStateValue>>} states - The states, which may be spelled Java's way.
@@ -1 +1 @@
1
- {"version":3,"file":"blockStates.js","names":[],"sources":["../src/blockStates.ts"],"sourcesContent":["/**\n * The state half of the seam: how a Bedrock block spells the state values Java spells as words.\n *\n * Java writes a direction as `facing=north`. Bedrock writes it as a number, under a state name\n * of its own, and the number is not the same for every block: a dropper's `facing_direction`\n * calls north 2 and a piston's calls it 3, because Bedrock's piston points the other way. Nor\n * is it always a number - a redstone torch's `torch_facing_direction` spells north `south`, and\n * a door's `minecraft:cardinal_direction` spells it `east`. None of that can be worked out from\n * the state's name, so {@link import('./tables').blockStatesTable} reads it per block out of the\n * generated block mapping.\n *\n * Two functions, one each way, over a whole state record. A caller that holds Java's words -\n * `@jsprismarine/engine-systems` carries Java's redstone, fluid and piston models - reads a\n * block through {@link javaBlockStates}, works in words, and writes it back through\n * {@link bedrockBlockStates}. The round trip is exact for every state in the pinned palette; the\n * (block, state) pairs that have no word vocabulary at all are the reviewed\n * {@link import('./lossList').BLOCK_STATE_LOSSES} and travel as the Bedrock value untouched.\n */\nimport { blockStatesTable, blocksTable } from './tables';\n\n/** A block state value as either edition writes one; the palette carries booleans as 0 and 1. */\nexport type BlockStateValue = string | number | boolean;\n\n/** The state names each Bedrock block carries, from the block table's own target palette. */\nconst keysOf = new Map<string, ReadonlySet<string>>(\n blocksTable.statePalette.map(([name, keys]) => [`minecraft:${name}`, new Set(keys)])\n);\n\n/** The vocabularies of one Bedrock block, or undefined when it spells everything Java's way. */\nconst vocabularyOf = (name: string): Record<string, Record<string, string | number>> | undefined => {\n const index = blockStatesTable.blocks[name];\n return index === undefined ? undefined : blockStatesTable.vocabularies[index];\n};\n\n/** The reverse of one state's vocabulary, built once per state name on first use. */\nconst reversed = new Map<string, Map<string | number, string>>();\nconst wordsOf = (name: string, state: string): Map<string | number, string> | undefined => {\n const key = `${name} ${state}`;\n const cached = reversed.get(key);\n if (cached !== undefined) return cached;\n\n const vocabulary = vocabularyOf(name)?.[state];\n if (vocabulary === undefined) return undefined;\n\n // The generator refuses to emit a vocabulary that spells two words the same way, so the\n // reverse is a function.\n const words = new Map(Object.entries(vocabulary).map(([word, value]) => [value, word]));\n reversed.set(key, words);\n return words;\n};\n\n/**\n * Rewrites a block's states into the Bedrock palette's own spelling.\n *\n * Every word the block has a vocabulary for becomes the value Bedrock stores, and every state\n * this Bedrock block does not carry is dropped - Java's piston `extended` has no Bedrock state,\n * because an extended Bedrock piston is a piston with an arm block in front of it. A state the\n * block does carry and has no vocabulary for travels untouched, which is what a number, a\n * boolean, and the reviewed {@link import('./lossList').BLOCK_STATE_LOSSES} all want.\n *\n * @param {string} name - The namespaced Bedrock block identifier, such as `minecraft:piston`.\n * @param {Readonly<Record<string, BlockStateValue>>} states - The states, which may be spelled Java's way.\n * @returns {Record<string, BlockStateValue>} The states the palette holds. A block the pinned\n * data does not know - a custom block, or one of the Bedrock-only palette entries no Java\n * block maps onto - comes back unchanged, because there is nothing to translate it against.\n * @example\n * ```typescript\n * bedrockBlockStates('minecraft:piston', { facing_direction: 'north', extended_bit: true });\n * // { facing_direction: 3 }\n * ```\n */\nexport const bedrockBlockStates = (\n name: string,\n states: Readonly<Record<string, BlockStateValue>>\n): Record<string, BlockStateValue> => {\n const keys = keysOf.get(name);\n if (keys === undefined) return { ...states };\n\n const vocabularies = vocabularyOf(name);\n const bedrock: Record<string, BlockStateValue> = {};\n for (const [state, value] of Object.entries(states)) {\n if (!keys.has(state)) continue;\n const spelled = typeof value === 'string' ? vocabularies?.[state]?.[value] : undefined;\n bedrock[state] = spelled ?? value;\n }\n return bedrock;\n};\n\n/**\n * Rewrites a block's states into Java's words, the inverse of {@link bedrockBlockStates}.\n *\n * Nothing is dropped and nothing is added: a state with no vocabulary, which is every number\n * and every boolean, travels untouched.\n *\n * @param {string} name - The namespaced Bedrock block identifier.\n * @param {Readonly<Record<string, BlockStateValue>>} states - The states as the palette holds them.\n * @returns {Record<string, BlockStateValue>} The same states, with Java's word wherever one exists.\n * @example\n * ```typescript\n * javaBlockStates('minecraft:piston', { facing_direction: 3 }); // { facing_direction: 'north' }\n * ```\n */\nexport const javaBlockStates = (\n name: string,\n states: Readonly<Record<string, BlockStateValue>>\n): Record<string, BlockStateValue> => {\n if (vocabularyOf(name) === undefined) return { ...states };\n\n const java: Record<string, BlockStateValue> = {};\n for (const [state, value] of Object.entries(states)) {\n const word = typeof value === 'boolean' ? undefined : wordsOf(name, state)?.get(value);\n java[state] = word ?? value;\n }\n return java;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,SAAS,IAAI,IACf,YAAY,aAAa,KAAK,CAAC,MAAM,UAAU,CAAC,aAAa,QAAQ,IAAI,IAAI,IAAI,CAAC,CAAC,CACvF;;AAGA,IAAM,gBAAgB,SAA8E;CAChG,MAAM,QAAQ,iBAAiB,OAAO;CACtC,OAAO,UAAU,KAAA,IAAY,KAAA,IAAY,iBAAiB,aAAa;AAC3E;;AAGA,IAAM,2BAAW,IAAI,IAA0C;AAC/D,IAAM,WAAW,MAAc,UAA4D;CACvF,MAAM,MAAM,GAAG,KAAK,GAAG;CACvB,MAAM,SAAS,SAAS,IAAI,GAAG;CAC/B,IAAI,WAAW,KAAA,GAAW,OAAO;CAEjC,MAAM,aAAa,aAAa,IAAI,CAAC,GAAG;CACxC,IAAI,eAAe,KAAA,GAAW,OAAO,KAAA;CAIrC,MAAM,QAAQ,IAAI,IAAI,OAAO,QAAQ,UAAU,CAAC,CAAC,KAAK,CAAC,MAAM,WAAW,CAAC,OAAO,IAAI,CAAC,CAAC;CACtF,SAAS,IAAI,KAAK,KAAK;CACvB,OAAO;AACX;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAa,sBACT,MACA,WACkC;CAClC,MAAM,OAAO,OAAO,IAAI,IAAI;CAC5B,IAAI,SAAS,KAAA,GAAW,OAAO,EAAE,GAAG,OAAO;CAE3C,MAAM,eAAe,aAAa,IAAI;CACtC,MAAM,UAA2C,CAAC;CAClD,KAAK,MAAM,CAAC,OAAO,UAAU,OAAO,QAAQ,MAAM,GAAG;EACjD,IAAI,CAAC,KAAK,IAAI,KAAK,GAAG;EAEtB,QAAQ,UADQ,OAAO,UAAU,WAAW,eAAe,MAAM,GAAG,SAAS,KAAA,MACjD;CAChC;CACA,OAAO;AACX;;;;;;;;;;;;;;;AAgBA,IAAa,mBACT,MACA,WACkC;CAClC,IAAI,aAAa,IAAI,MAAM,KAAA,GAAW,OAAO,EAAE,GAAG,OAAO;CAEzD,MAAM,OAAwC,CAAC;CAC/C,KAAK,MAAM,CAAC,OAAO,UAAU,OAAO,QAAQ,MAAM,GAE9C,KAAK,UADQ,OAAO,UAAU,YAAY,KAAA,IAAY,QAAQ,MAAM,KAAK,CAAC,EAAE,IAAI,KAAK,MAC/D;CAE1B,OAAO;AACX"}
1
+ {"version":3,"file":"blockStates.js","names":[],"sources":["../src/blockStates.ts"],"sourcesContent":["/**\n * The state half of the seam: how a Bedrock block spells the state values Java spells as words.\n *\n * Java writes a direction as `facing=north`. Bedrock writes it as a number, under a state name\n * of its own, and the number is not the same for every block: a dropper's `facing_direction`\n * calls north 2 and a piston's calls it 3, because Bedrock's piston points the other way. Nor\n * is it always a number - a redstone torch's `torch_facing_direction` spells north `south`, and\n * a door's `minecraft:cardinal_direction` spells it `east`. None of that can be worked out from\n * the state's name, so {@link import('./tables').blockStatesTable} reads it per block out of the\n * generated block mapping.\n *\n * Two functions, one each way, over a whole state record. A caller that holds Java's words -\n * `@jsprismarine/engine-systems` carries Java's redstone, fluid and piston models - reads a\n * block through {@link javaBlockStates}, works in words, and writes it back through\n * {@link bedrockBlockStates}. The round trip is exact for every state in the pinned palette; the\n * (block, state) pairs that have no word vocabulary at all are the reviewed\n * {@link BLOCK_STATE_LOSSES} and travel as the Bedrock value untouched.\n */\nimport { blockStatesTable, blocksTable } from './tables';\n\n/** A block state value as either edition writes one; the palette carries booleans as 0 and 1. */\nexport type BlockStateValue = string | number | boolean;\n\n/** The state names each Bedrock block carries, from the block table's own target palette. */\nconst keysOf = new Map<string, ReadonlySet<string>>(\n blocksTable.statePalette.map(([name, keys]) => [`minecraft:${name}`, new Set(keys)])\n);\n\n/** The vocabularies of one Bedrock block, or undefined when it spells everything Java's way. */\nconst vocabularyOf = (name: string): Record<string, Record<string, string | number>> | undefined => {\n const index = blockStatesTable.blocks[name];\n return index === undefined ? undefined : blockStatesTable.vocabularies[index];\n};\n\n/** The reverse of one state's vocabulary, built once per state name on first use. */\nconst reversed = new Map<string, Map<string | number, string>>();\nconst wordsOf = (name: string, state: string): Map<string | number, string> | undefined => {\n const key = `${name} ${state}`;\n const cached = reversed.get(key);\n if (cached !== undefined) return cached;\n\n const vocabulary = vocabularyOf(name)?.[state];\n if (vocabulary === undefined) return undefined;\n\n // The generator refuses to emit a vocabulary that spells two words the same way, so the\n // reverse is a function.\n const words = new Map(Object.entries(vocabulary).map(([word, value]) => [value, word]));\n reversed.set(key, words);\n return words;\n};\n\n/**\n * Rewrites a block's states into the Bedrock palette's own spelling.\n *\n * Every word the block has a vocabulary for becomes the value Bedrock stores, and every state\n * this Bedrock block does not carry is dropped - Java's piston `extended` has no Bedrock state,\n * because an extended Bedrock piston is a piston with an arm block in front of it. A state the\n * block does carry and has no vocabulary for travels untouched, which is what a number, a\n * boolean, and the reviewed {@link BLOCK_STATE_LOSSES} all want.\n *\n * @param {string} name - The namespaced Bedrock block identifier, such as `minecraft:piston`.\n * @param {Readonly<Record<string, BlockStateValue>>} states - The states, which may be spelled Java's way.\n * @returns {Record<string, BlockStateValue>} The states the palette holds. A block the pinned\n * data does not know - a custom block, or one of the Bedrock-only palette entries no Java\n * block maps onto - comes back unchanged, because there is nothing to translate it against.\n * @example\n * ```typescript\n * bedrockBlockStates('minecraft:piston', { facing_direction: 'north', extended_bit: true });\n * // { facing_direction: 3 }\n * ```\n */\nexport const bedrockBlockStates = (\n name: string,\n states: Readonly<Record<string, BlockStateValue>>\n): Record<string, BlockStateValue> => {\n const keys = keysOf.get(name);\n if (keys === undefined) return { ...states };\n\n const vocabularies = vocabularyOf(name);\n const bedrock: Record<string, BlockStateValue> = {};\n for (const [state, value] of Object.entries(states)) {\n if (!keys.has(state)) continue;\n const spelled = typeof value === 'string' ? vocabularies?.[state]?.[value] : undefined;\n bedrock[state] = spelled ?? value;\n }\n return bedrock;\n};\n\n/**\n * Rewrites a block's states into Java's words, the inverse of {@link bedrockBlockStates}.\n *\n * Nothing is dropped and nothing is added: a state with no vocabulary, which is every number\n * and every boolean, travels untouched.\n *\n * @param {string} name - The namespaced Bedrock block identifier.\n * @param {Readonly<Record<string, BlockStateValue>>} states - The states as the palette holds them.\n * @returns {Record<string, BlockStateValue>} The same states, with Java's word wherever one exists.\n * @example\n * ```typescript\n * javaBlockStates('minecraft:piston', { facing_direction: 3 }); // { facing_direction: 'north' }\n * ```\n */\nexport const javaBlockStates = (\n name: string,\n states: Readonly<Record<string, BlockStateValue>>\n): Record<string, BlockStateValue> => {\n if (vocabularyOf(name) === undefined) return { ...states };\n\n const java: Record<string, BlockStateValue> = {};\n for (const [state, value] of Object.entries(states)) {\n const word = typeof value === 'boolean' ? undefined : wordsOf(name, state)?.get(value);\n java[state] = word ?? value;\n }\n return java;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,SAAS,IAAI,IACf,YAAY,aAAa,KAAK,CAAC,MAAM,UAAU,CAAC,aAAa,QAAQ,IAAI,IAAI,IAAI,CAAC,CAAC,CACvF;;AAGA,IAAM,gBAAgB,SAA8E;CAChG,MAAM,QAAQ,iBAAiB,OAAO;CACtC,OAAO,UAAU,KAAA,IAA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Resolver, type PackIdentifierResolution, type PackI
10
10
  export { SERVER_SIDE_REGISTRIES, type ServerSideRegistry, type ServerSideRegistryId } from './packRegistries.js';
11
11
  export { BEDROCK_BIOME_LOSSES, BLOCK_ENTITY_CONTENT_LOSSES, BLOCK_LOSSES, BLOCK_MERGES, BLOCK_STATE_LOSSES, DROPPED_BLOCK_PROPERTIES, ENTITY_LOSSES, ENTITY_MERGES, ITEM_LOSSES, ITEM_MERGES, PARTIAL_BLOCK_PROPERTY_COLLAPSES, REGISTRY_LOSSES, UNTRANSLATED_REGISTRIES, type BedrockBiomeLoss, type BlockEntityContentLoss, type BlockEntityContentLossKind, type BlockLoss, type BlockMerge, type BlockPropertyRecovery, type BlockStateLoss, type DroppedBlockProperty, type EntityLoss, type EntityLossKind, type EntityMerge, type ItemLoss, type ItemMerge, type PartialBlockPropertyCollapse, type RegistryLoss, type UntranslatedRegistry } from './lossList.js';
12
12
  export { MAPPED_REGISTRIES, bedrockBiomeToJava, javaIdentifierToBedrock, type BedrockBiome, type BedrockBiomeResult, type IdentifierMappingResult, type MappedRegistry } from './registryMapping.js';
13
+ export type { Conflict } from './blockProperties.js';
14
+ export type { StateValue } from './blockProperties.js';
13
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EACH,iBAAiB,EACjB,4BAA4B,EAC5B,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,kCAAkC,EAClC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kB,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC9G,OAAO,EACH,oBAAoB,EACpB,2BAA2B,EAC3B,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,gCAAgC,EAChC,eAAe,EACf,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,4BAA4B,EACjC,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAC5B,MAAM,YAAY,CAAC;AACpB,OAAO,EACH,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACtB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
@@ -293,7 +293,7 @@ export declare const PARTIAL_BLOCK_PROPERTY_COLLAPSES: readonly [{
293
293
  }];
294
294
  /**
295
295
  * A Bedrock block state whose values no single Java property spells, so there is no word
296
- * vocabulary for it in {@link import('./blockStates').bedrockBlockStates}.
296
+ * vocabulary for it in {@link bedrockBlockStates}.
297
297
  */
298
298
  export interface BlockStateLoss {
299
299
  /** The Bedrock state name. */
@@ -306,7 +306,7 @@ export interface BlockStateLoss {
306
306
  /**
307
307
  * The Bedrock states a caller cannot write in Java's words.
308
308
  *
309
- * {@link import('./blockStates').bedrockBlockStates} reads every other state's vocabulary out
309
+ * {@link bedrockBlockStates} reads every other state's vocabulary out
310
310
  * of the block mapping, by finding the one Java property whose values pick its values. These
311
311
  * twenty-seven (block, state) pairs have no such property: Bedrock either folds two Java
312
312
  * properties into one state or packs several booleans into one number, so a word has nothing to
@@ -857,7 +857,7 @@ export interface BedrockBiomeLoss {
857
857
  readonly reference: string;
858
858
  }
859
859
  /**
860
- * The Bedrock biomes {@link import('./registryMapping').bedrockBiomeToJava} cannot name in
860
+ * The Bedrock biomes {@link bedrockBiomeToJava} cannot name in
861
861
  * Java, none of which any of Java 26.3's biome documents reaches.
862
862
  *
863
863
  * All but one are legacy terrain, kept so an old Bedrock world still reads back. A chunk only
package/dist/lossList.js CHANGED
@@ -370,7 +370,7 @@ var PACKED_FACES = {
370
370
  /**
371
371
  * The Bedrock states a caller cannot write in Java's words.
372
372
  *
373
- * {@link import('./blockStates').bedrockBlockStates} reads every other state's vocabulary out
373
+ * {@link bedrockBlockStates} reads every other state's vocabulary out
374
374
  * of the block mapping, by finding the one Java property whose values pick its values. These
375
375
  * twenty-seven (block, state) pairs have no such property: Bedrock either folds two Java
376
376
  * properties into one state or packs several booleans into one number, so a word has nothing to
@@ -916,7 +916,7 @@ var LEGACY_MUTATED_VARIANT = {
916
916
  reference: `${NOTE} section 6`
917
917
  };
918
918
  /**
919
- * The Bedrock biomes {@link import('./registryMapping').bedrockBiomeToJava} cannot name in
919
+ * The Bedrock biomes {@link bedrockBiomeToJava} cannot name in
920
920
  * Java, none of which any of Java 26.3's biome documents reaches.
921
921
  *
922
922
  * All but one are legacy terrain, kept so an old Bedrock world still reads back. A chunk only
@@ -1 +1 @@
1
- {"version":3,"file":"lossList.js","names":[],"sources":["../src/lossList.ts"],"sourcesContent":["/**\n * The reviewed loss allow list: every known place where the Java 26.3 to\n * pinned Bedrock release mapping loses information, each with a reason and a\n * reference. The property tests fail when a loss appears that is not listed\n * here, and also when a listed loss stops occurring, so the list stays exact\n * in both directions.\n *\n * The references cite `docs/research/java-to-bedrock-translation.md` (the\n * measured join this package reproduces) by section, and GeyserMC issues\n * where one documents the loss directly.\n */\n\nconst NOTE = 'docs/research/java-to-bedrock-translation.md';\n\n/** Where the information a collapsed Java block property reappears, if anywhere. */\nexport type BlockPropertyRecovery =\n /** Bedrock's second per-sub-chunk block storage layer carries it. */\n | 'second-layer'\n /** Bedrock block entity NBT carries it. */\n | 'block-entity'\n /** The Bedrock client recomputes it from neighboring blocks. */\n | 'client-computed'\n /** Nothing carries it; in every listed case neither edition renders it. */\n | 'none';\n\n/**\n * A Java block state property that the Bedrock block state cannot express:\n * two Java states differing only in this property map to one Bedrock state\n * for every state of the listed blocks.\n */\nexport interface DroppedBlockProperty {\n /** The Java property name. */\n readonly property: string;\n /** Every affected Java block, or only the count where the list is too long to review name by name. */\n readonly blocks: readonly string[] | { readonly count: number };\n readonly recovery: BlockPropertyRecovery;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * Java block properties the Bedrock state drops for every state of the listed\n * blocks. The counts and lists are verified against the generated table by\n * the round-trip property test.\n */\nexport const DROPPED_BLOCK_PROPERTIES = [\n {\n property: 'waterlogged',\n blocks: { count: 504 },\n recovery: 'second-layer',\n reason: 'Bedrock has no waterlogged flag; water travels in the second block storage layer.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'powered',\n blocks: { count: 72 },\n recovery: 'none',\n reason: 'Doors, trapdoors, fence gates, pressure plates and heads render identically powered or not in both editions.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'facing',\n blocks: [\n 'minecraft:black_shulker_box',\n 'minecraft:blue_shulker_box',\n 'minecraft:brown_shulker_box',\n 'minecraft:cyan_shulker_box',\n 'minecraft:gray_shulker_box',\n 'minecraft:green_shulker_box',\n 'minecraft:light_blue_shulker_box',\n 'minecraft:light_gray_shulker_box',\n 'minecraft:lime_shulker_box',\n 'minecraft:magenta_shulker_box',\n 'minecraft:moving_piston',\n 'minecraft:orange_shulker_box',\n 'minecraft:pink_shulker_box',\n 'minecraft:purple_shulker_box',\n 'minecraft:red_shulker_box',\n 'minecraft:shulker_box',\n 'minecraft:white_shulker_box',\n 'minecraft:yellow_shulker_box'\n ],\n recovery: 'block-entity',\n reason: 'Shulker box facing travels in Bedrock block entity NBT, not the block state.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'distance',\n blocks: [\n 'minecraft:acacia_leaves',\n 'minecraft:azalea_leaves',\n 'minecraft:birch_leaves',\n 'minecraft:cherry_leaves',\n 'minecraft:dark_oak_leaves',\n 'minecraft:flowering_azalea_leaves',\n 'minecraft:jungle_leaves',\n 'minecraft:mangrove_leaves',\n 'minecraft:oak_leaves',\n 'minecraft:orange_poplar_leaves',\n 'minecraft:pale_oak_leaves',\n 'minecraft:red_poplar_leaves',\n 'minecraft:spruce_leaves',\n 'minecraft:yellow_poplar_leaves'\n ],\n recovery: 'client-computed',\n reason: 'The Bedrock client recomputes leaf decay distance from neighbors.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'type',\n blocks: [\n 'minecraft:chest',\n 'minecraft:copper_chest',\n 'minecraft:exposed_copper_chest',\n 'minecraft:moving_piston',\n 'minecraft:oxidized_copper_chest',\n 'minecraft:trapped_chest',\n 'minecraft:waxed_copper_chest',\n 'minecraft:waxed_exposed_copper_chest',\n 'minecraft:waxed_oxidized_copper_chest',\n 'minecraft:waxed_weathered_copper_chest',\n 'minecraft:weathered_copper_chest'\n ],\n recovery: 'block-entity',\n reason: 'The double-chest pair position travels in Bedrock block entity NBT.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'copper_golem_pose',\n blocks: [\n 'minecraft:copper_golem_statue',\n 'minecraft:exposed_copper_golem_statue',\n 'minecraft:oxidized_copper_golem_statue',\n 'minecraft:waxed_copper_golem_statue',\n 'minecraft:waxed_exposed_copper_golem_statue',\n 'minecraft:waxed_oxidized_copper_golem_statue',\n 'minecraft:waxed_weathered_copper_golem_statue',\n 'minecraft:weathered_copper_golem_statue'\n ],\n recovery: 'block-entity',\n reason: 'Copper golem poses are block states on Java and block entity NBT on Bedrock.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'rotation',\n blocks: [\n 'minecraft:creeper_head',\n 'minecraft:dragon_head',\n 'minecraft:piglin_head',\n 'minecraft:player_head',\n 'minecraft:skeleton_skull',\n 'minecraft:wither_skeleton_skull',\n 'minecraft:zombie_head'\n ],\n recovery: 'block-entity',\n reason: 'Skull rotation travels in Bedrock block entity NBT as degrees.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'power',\n blocks: ['minecraft:calibrated_sculk_sensor', 'minecraft:sculk_sensor', 'minecraft:target'],\n recovery: 'none',\n reason: 'The output power level is not visual on these blocks.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'up',\n blocks: ['minecraft:vine'],\n recovery: 'client-computed',\n reason: 'The Bedrock client computes block connections from neighbors.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'snowy',\n blocks: ['minecraft:grass_block', 'minecraft:mycelium', 'minecraft:podzol'],\n recovery: 'client-computed',\n reason: 'The Bedrock client computes the snowy top texture from the block above.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'stage',\n blocks: ['minecraft:bamboo', 'minecraft:mangrove_propagule'],\n recovery: 'none',\n reason: 'The sapling growth stage is not visual.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'signal_fire',\n blocks: ['minecraft:campfire', 'minecraft:soul_campfire'],\n recovery: 'none',\n reason: 'Whether a campfire sits on hay is not part of the Bedrock block state.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'extended',\n blocks: ['minecraft:piston', 'minecraft:sticky_piston'],\n recovery: 'none',\n reason: 'Bedrock tracks piston extension in the piston block entity.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'cracked',\n blocks: ['minecraft:decorated_pot'],\n recovery: 'block-entity',\n reason: 'Decorated pot detail travels in Bedrock block entity NBT.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'has_record',\n blocks: ['minecraft:jukebox'],\n recovery: 'block-entity',\n reason: 'The inserted disc travels in Bedrock block entity NBT.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'has_book',\n blocks: ['minecraft:lectern'],\n recovery: 'block-entity',\n reason: 'The held book travels in Bedrock block entity NBT.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'instrument',\n blocks: ['minecraft:note_block'],\n recovery: 'none',\n reason: 'Bedrock derives the note block instrument from the block below.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'note',\n blocks: ['minecraft:note_block'],\n recovery: 'block-entity',\n reason: 'The pitch travels in Bedrock block entity NBT.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'short',\n blocks: ['minecraft:piston_head'],\n recovery: 'none',\n reason: 'The shortened mid-push arm is not part of the Bedrock block state.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'locked',\n blocks: ['minecraft:repeater'],\n recovery: 'none',\n reason: 'Repeater locking is recomputed from neighboring repeaters.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'bottom',\n blocks: ['minecraft:scaffolding'],\n recovery: 'client-computed',\n reason: 'The Bedrock client computes the floating-scaffolding bottom face itself.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'mode',\n blocks: ['minecraft:test_block'],\n recovery: 'none',\n reason: 'The test block has no Bedrock concept at all; see BLOCK_LOSSES.',\n reference: `${NOTE} section 2`\n }\n] as const satisfies readonly DroppedBlockProperty[];\n\n/**\n * A Java block whose state property collapses only for some of its values,\n * so the property is dropped for part of the block's state space rather\n * than all of it.\n */\nexport interface PartialBlockPropertyCollapse {\n /** The Java block identifier. */\n readonly block: string;\n /** The properties whose collapse depends on the other properties' values. */\n readonly properties: readonly string[];\n readonly reason: string;\n readonly reference: string;\n}\n\nconst BUTTON_COLLAPSE = {\n properties: ['facing'],\n reason: \"Bedrock's facing_direction 0 and 1 (floor and ceiling) ignore the horizontal facing Java keeps.\",\n reference: `${NOTE} section 2`\n} as const;\n\nconst MUSHROOM_COLLAPSE = {\n properties: ['down', 'east', 'north', 'south', 'up', 'west'],\n reason: \"Java's 64 face combinations collapse onto Bedrock's huge_mushroom_bits values.\",\n reference: `${NOTE} section 2`\n} as const;\n\n/**\n * Blocks where a state property collapses for only part of the state space.\n * The round-trip property test accepts a non-identity round trip for these\n * blocks only on the listed properties.\n */\nexport const PARTIAL_BLOCK_PROPERTY_COLLAPSES = [\n { block: 'minecraft:acacia_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:bamboo_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:birch_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:cherry_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:crimson_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:dark_oak_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:jungle_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:mangrove_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:oak_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:pale_oak_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:polished_blackstone_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:poplar_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:spruce_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:stone_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:warped_button', ...BUTTON_COLLAPSE },\n {\n block: 'minecraft:lever',\n properties: ['facing', 'powered'],\n reason: \"Bedrock's lever_direction merges the floor and ceiling facings, and the powered bit folds into the direction for some orientations.\",\n reference: `${NOTE} section 2`\n },\n { block: 'minecraft:brown_mushroom_block', ...MUSHROOM_COLLAPSE },\n { block: 'minecraft:mushroom_stem', ...MUSHROOM_COLLAPSE },\n { block: 'minecraft:red_mushroom_block', ...MUSHROOM_COLLAPSE }\n] as const satisfies readonly PartialBlockPropertyCollapse[];\n\n/**\n * A Bedrock block state whose values no single Java property spells, so there is no word\n * vocabulary for it in {@link import('./blockStates').bedrockBlockStates}.\n */\nexport interface BlockStateLoss {\n /** The Bedrock state name. */\n readonly state: string;\n /** Every Bedrock block that carries the state this way. */\n readonly blocks: readonly string[];\n readonly reason: string;\n readonly reference: string;\n}\n\n/** The fifteen Bedrock buttons; Bedrock spells the oak one `wooden_button`. */\nconst BEDROCK_BUTTONS = [\n 'minecraft:acacia_button',\n 'minecraft:bamboo_button',\n 'minecraft:birch_button',\n 'minecraft:cherry_button',\n 'minecraft:crimson_button',\n 'minecraft:dark_oak_button',\n 'minecraft:jungle_button',\n 'minecraft:mangrove_button',\n 'minecraft:pale_oak_button',\n 'minecraft:polished_blackstone_button',\n 'minecraft:poplar_button',\n 'minecraft:spruce_button',\n 'minecraft:stone_button',\n 'minecraft:warped_button',\n 'minecraft:wooden_button'\n] as const;\n\nconst PACKED_FACES = {\n reason: 'Bedrock packs the six face booleans Java carries separately into the bits of one number.',\n reference: `${NOTE} section 2`\n} as const;\n\n/**\n * The Bedrock states a caller cannot write in Java's words.\n *\n * {@link import('./blockStates').bedrockBlockStates} reads every other state's vocabulary out\n * of the block mapping, by finding the one Java property whose values pick its values. These\n * twenty-seven (block, state) pairs have no such property: Bedrock either folds two Java\n * properties into one state or packs several booleans into one number, so a word has nothing to\n * translate to. A caller that holds one of them keeps the Bedrock value it read.\n */\nexport const BLOCK_STATE_LOSSES = [\n {\n state: 'facing_direction',\n blocks: BEDROCK_BUTTONS,\n reason:\n \"Bedrock's button facing is the direction the button sticks out of its support, which \" +\n 'Java spells as `face` and `facing` together: a floor button is 1 whichever way it faces.',\n reference: `${NOTE} section 2`\n },\n {\n state: 'huge_mushroom_bits',\n blocks: ['minecraft:brown_mushroom_block', 'minecraft:mushroom_stem', 'minecraft:red_mushroom_block'],\n ...PACKED_FACES\n },\n {\n state: 'multi_face_direction_bits',\n blocks: ['minecraft:glow_lichen', 'minecraft:resin_clump', 'minecraft:sculk_vein'],\n ...PACKED_FACES\n },\n { state: 'books_stored', blocks: ['minecraft:chiseled_bookshelf'], ...PACKED_FACES },\n { state: 'vine_direction_bits', blocks: ['minecraft:vine'], ...PACKED_FACES },\n {\n state: 'facing_direction',\n blocks: ['minecraft:jigsaw'],\n reason:\n \"Java's twelve jigsaw orientations are a direction and a roll together; Bedrock keeps \" +\n 'the direction here and the roll in `rotation`, so neither reads back as an orientation.',\n reference: `${NOTE} section 2`\n },\n {\n state: 'rotation',\n blocks: ['minecraft:jigsaw'],\n reason: \"The roll half of Java's jigsaw orientation; see this list's `facing_direction` entry.\",\n reference: `${NOTE} section 2`\n },\n {\n state: 'lever_direction',\n blocks: ['minecraft:lever'],\n reason: \"Java's `face` and `facing` together, the same fold as the button's.\",\n reference: `${NOTE} section 2`\n },\n {\n state: 'open_bit',\n blocks: ['minecraft:lever'],\n reason:\n 'A floor or ceiling lever has one Bedrock direction for two Java facings, and the ' +\n 'GeyserMC join flips `open_bit` to keep south and east apart, so Java `powered` does ' +\n 'not spell it on its own.',\n reference: `${NOTE} section 2`\n }\n] as const satisfies readonly BlockStateLoss[];\n\n/** A Bedrock identifier that several Java blocks legitimately collapse onto. */\nexport interface BlockMerge {\n /** The shared Bedrock identifier. */\n readonly bedrockId: string;\n readonly reason: string;\n readonly reference: string;\n}\n\nconst WALL_VARIANT = {\n reason: 'Bedrock uses one block for the floor and wall variants; the placement travels in the block state.',\n reference: `${NOTE} section 2`\n} as const;\n\nconst PLANT_BODY = {\n reason: \"Bedrock uses one block where Java splits a plant into a head and a body ('_plant') block.\",\n reference: `${NOTE} section 2`\n} as const;\n\n/**\n * Bedrock identifiers that receive more than one Java block. The round-trip\n * property test accepts a cross-block round trip only for these targets.\n */\nexport const BLOCK_MERGES = [\n { bedrockId: 'minecraft:acacia_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:air',\n reason: \"Java's air, cave_air and void_air are one Bedrock air.\",\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:bamboo_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:bed',\n reason: 'The 16 Java bed colors are one Bedrock bed; the color travels in block entity NBT.',\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:big_dripleaf', ...PLANT_BODY },\n { bedrockId: 'minecraft:birch_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:cauldron',\n reason: \"Java's empty, water, lava and powder snow cauldrons are one Bedrock cauldron with a liquid state.\",\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:cave_vines', ...PLANT_BODY },\n { bedrockId: 'minecraft:cherry_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:copper_torch', ...WALL_VARIANT },\n { bedrockId: 'minecraft:creeper_head', ...WALL_VARIANT },\n { bedrockId: 'minecraft:crimson_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:dark_oak_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:dragon_head', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:flower_pot',\n reason: 'The pot and all 39 potted plants are one Bedrock flower pot; the contents travel in block entity NBT.',\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:jungle_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:kelp', ...PLANT_BODY },\n { bedrockId: 'minecraft:mangrove_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:melon_stem',\n reason: \"Java's attached stem is a Bedrock stem state, not a separate block.\",\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:oak_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:pale_oak_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:piglin_head', ...WALL_VARIANT },\n { bedrockId: 'minecraft:player_head', ...WALL_VARIANT },\n { bedrockId: 'minecraft:poplar_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:pumpkin_stem',\n reason: \"Java's attached stem is a Bedrock stem state, not a separate block.\",\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:redstone_torch', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:seagrass',\n reason: \"Java's tall seagrass halves are Bedrock seagrass states.\",\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:skeleton_skull', ...WALL_VARIANT },\n { bedrockId: 'minecraft:soul_torch', ...WALL_VARIANT },\n { bedrockId: 'minecraft:spruce_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:standing_banner',\n reason: 'The 16 Java banner colors are one Bedrock banner; the color travels in block entity NBT.',\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:torch', ...WALL_VARIANT },\n { bedrockId: 'minecraft:twisting_vines', ...PLANT_BODY },\n {\n bedrockId: 'minecraft:unknown',\n reason: 'The two Java test blocks have no Bedrock concept; see BLOCK_LOSSES.',\n reference: `${NOTE} section 2`\n },\n {\n bedrockId: 'minecraft:unlit_redstone_torch',\n ...WALL_VARIANT\n },\n {\n bedrockId: 'minecraft:wall_banner',\n reason: 'The 16 Java wall banner colors are one Bedrock wall banner; the color travels in block entity NBT.',\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:warped_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:weeping_vines', ...PLANT_BODY },\n { bedrockId: 'minecraft:wither_skeleton_skull', ...WALL_VARIANT },\n { bedrockId: 'minecraft:zombie_head', ...WALL_VARIANT }\n] as const satisfies readonly BlockMerge[];\n\n/** A Java block with no Bedrock concept at all. */\nexport interface BlockLoss {\n /** The Java block identifier. */\n readonly javaId: string;\n /** The Bedrock identifier every state falls back to. */\n readonly bedrockFallback: string;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * The Java blocks with no Bedrock representation. All five of their states\n * map to `minecraft:unknown`, and a lookup reports the loss.\n */\nexport const BLOCK_LOSSES = [\n {\n javaId: 'minecraft:test_block',\n bedrockFallback: 'minecraft:unknown',\n reason: 'Test blocks do not exist on Bedrock.',\n reference: `${NOTE} section 2; GeyserMC/Geyser#6164`\n },\n {\n javaId: 'minecraft:test_instance_block',\n bedrockFallback: 'minecraft:unknown',\n reason: 'Test instance blocks do not exist on Bedrock.',\n reference: `${NOTE} section 2; GeyserMC/Geyser#6164`\n }\n] as const satisfies readonly BlockLoss[];\n\n/** A Java item whose identity does not survive the mapping. */\nexport interface ItemLoss {\n /** The Java item identifier. */\n readonly javaId: string;\n /** The Bedrock identifier the item falls back to. */\n readonly bedrockFallback: string;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * The genuinely lossy item merges: a Bedrock player sees the fallback item\n * with none of the Java item's identity.\n */\nexport const ITEM_LOSSES = [\n {\n javaId: 'minecraft:spectral_arrow',\n bedrockFallback: 'minecraft:arrow',\n reason: 'Bedrock has no spectral arrow; it becomes a plain arrow.',\n reference: `${NOTE} section 3`\n },\n {\n javaId: 'minecraft:debug_stick',\n bedrockFallback: 'minecraft:stick',\n reason: 'Bedrock has no debug stick; it becomes a plain stick.',\n reference: `${NOTE} section 3`\n },\n {\n javaId: 'minecraft:knowledge_book',\n bedrockFallback: 'minecraft:book',\n reason: 'Bedrock has no knowledge book; it becomes a plain book.',\n reference: `${NOTE} section 3`\n },\n {\n javaId: 'minecraft:furnace_minecart',\n bedrockFallback: 'minecraft:hopper_minecart',\n reason: 'Bedrock has no furnace minecart item.',\n reference: `${NOTE} section 3`\n },\n {\n javaId: 'minecraft:test_block',\n bedrockFallback: 'minecraft:unknown',\n reason: 'Test blocks do not exist on Bedrock.',\n reference: `${NOTE} section 3; GeyserMC/Geyser#6164`\n },\n {\n javaId: 'minecraft:test_instance_block',\n bedrockFallback: 'minecraft:unknown',\n reason: 'Test instance blocks do not exist on Bedrock.',\n reference: `${NOTE} section 3; GeyserMC/Geyser#6164`\n }\n] as const satisfies readonly ItemLoss[];\n\n/** A Bedrock item identifier several Java items share. */\nexport interface ItemMerge {\n /** The shared Bedrock identifier. */\n readonly bedrockId: string;\n /** How the merged Java identity is recovered, when it is. */\n readonly recovery: string;\n readonly reference: string;\n}\n\n/**\n * Bedrock item identifiers that receive more than one Java item. The\n * round-trip property test accepts a non-identity round trip only for these.\n */\nexport const ITEM_MERGES = [\n {\n bedrockId: 'minecraft:arrow',\n recovery: 'Tipped arrows recover from potion NBT; spectral arrows do not recover.',\n reference: `${NOTE} section 3`\n },\n { bedrockId: 'minecraft:banner', recovery: 'The color recovers from Bedrock NBT.', reference: `${NOTE} section 3` },\n { bedrockId: 'minecraft:bed', recovery: 'The color recovers from Bedrock NBT.', reference: `${NOTE} section 3` },\n { bedrockId: 'minecraft:book', recovery: 'The knowledge book does not recover.', reference: `${NOTE} section 3` },\n {\n bedrockId: 'minecraft:filled_map',\n recovery: 'The 16 structure locator maps recover from map NBT.',\n reference: `${NOTE} section 3`\n },\n {\n bedrockId: 'minecraft:hopper_minecart',\n recovery: 'The furnace minecart does not recover.',\n reference: `${NOTE} section 3`\n },\n { bedrockId: 'minecraft:stick', recovery: 'The debug stick does not recover.', reference: `${NOTE} section 3` },\n {\n bedrockId: 'minecraft:unknown',\n recovery: 'The two test block items do not recover.',\n reference: `${NOTE} section 3`\n }\n] as const satisfies readonly ItemMerge[];\n\n/** How a Java entity type fails to reach Bedrock as itself. */\nexport type EntityLossKind =\n /** Shown to the Bedrock client as a different entity. */\n | 'rerender'\n /** No Bedrock representation at all. */\n | 'unrepresentable'\n /** Bedrock models it as a block, not an entity. */\n | 'block';\n\n/** A Java entity type that cannot reach the Bedrock client as itself. */\nexport interface EntityLoss {\n /** The Java entity type identifier. */\n readonly javaId: string;\n readonly kind: EntityLossKind;\n /** The Bedrock entity (or block) shown instead, when one exists. */\n readonly bedrockFallback?: string;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * The Java entity types without a Bedrock entity of their own against the\n * pinned Bedrock identifier list. The research note counts ten re-renders\n * against Geyser's 1.26.50 data; three of those resolve here instead:\n * `evoker` maps to its real Bedrock name `evocation_illager`, and\n * `lingering_potion` and `trader_llama` exist in the pinned identifier\n * list under their own names.\n */\nexport const ENTITY_LOSSES = [\n {\n javaId: 'minecraft:text_display',\n kind: 'rerender',\n bedrockFallback: 'minecraft:armor_stand',\n reason: 'Bedrock has no display entities; Geyser shows text displays as armor stands.',\n reference: `${NOTE} section 4; GeyserMC/Geyser#3810`\n },\n {\n javaId: 'minecraft:interaction',\n kind: 'rerender',\n bedrockFallback: 'minecraft:armor_stand',\n reason: 'Bedrock has no interaction entity.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:spectral_arrow',\n kind: 'rerender',\n bedrockFallback: 'minecraft:arrow',\n reason: 'Bedrock has no spectral arrow entity.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:furnace_minecart',\n kind: 'rerender',\n bedrockFallback: 'minecraft:minecart',\n reason: 'Bedrock has no furnace minecart.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:spawner_minecart',\n kind: 'rerender',\n bedrockFallback: 'minecraft:minecart',\n reason: 'Bedrock has no spawner minecart.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:giant',\n kind: 'rerender',\n bedrockFallback: 'minecraft:zombie',\n reason: 'Bedrock has no giant; it is shown as a zombie.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:illusioner',\n kind: 'rerender',\n bedrockFallback: 'minecraft:evocation_illager',\n reason: 'Bedrock has no illusioner; it is shown as an evoker.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:block_display',\n kind: 'unrepresentable',\n reason: 'Bedrock has no display entities and no stand-in renders a block.',\n reference: `${NOTE} section 4; GeyserMC/Geyser#3810`\n },\n {\n javaId: 'minecraft:item_display',\n kind: 'unrepresentable',\n reason: 'Bedrock has no display entities and no stand-in renders an item.',\n reference: `${NOTE} section 4; GeyserMC/Geyser#3810`\n },\n {\n javaId: 'minecraft:marker',\n kind: 'unrepresentable',\n reason: 'Markers render in neither edition and are only sent inside non-vanilla entity type tags.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:mannequin',\n kind: 'unrepresentable',\n reason: 'Java 26.3 added the mannequin and the pinned Bedrock identifier list has no counterpart; listed rather than guessed.',\n reference: 'reports/registries.json (Java 26.3) against entity_identifiers (BDS 1.26.51.1)'\n },\n {\n javaId: 'minecraft:item_frame',\n kind: 'block',\n bedrockFallback: 'minecraft:frame',\n reason: 'Item frames are entities on Java and blocks on Bedrock.',\n reference: `${NOTE} section 2`\n },\n {\n javaId: 'minecraft:glow_item_frame',\n kind: 'block',\n bedrockFallback: 'minecraft:glow_frame',\n reason: 'Glow item frames are entities on Java and blocks on Bedrock.',\n reference: `${NOTE} section 2`\n }\n] as const satisfies readonly EntityLoss[];\n\n/** A Bedrock entity identifier several Java entity types share. */\nexport interface EntityMerge {\n /** The shared Bedrock identifier. */\n readonly bedrockId: string;\n /** How the merged Java identity is recovered. */\n readonly recovery: string;\n readonly reference: string;\n}\n\n/**\n * Bedrock entity identifiers that receive more than one Java entity type.\n * The round-trip property test accepts a non-identity round trip only for\n * these.\n */\nexport const ENTITY_MERGES = [\n {\n bedrockId: 'minecraft:boat',\n recovery: \"Java's eleven wooden boats and rafts are one Bedrock boat; the wood travels as a variant.\",\n reference: `${NOTE} section 4`\n },\n {\n bedrockId: 'minecraft:chest_boat',\n recovery:\n \"Java's eleven wooden chest boats and rafts are one Bedrock chest boat; the wood travels as a variant.\",\n reference: `${NOTE} section 4`\n }\n] as const satisfies readonly EntityMerge[];\n\n/** A Java registry entry whose identity does not survive the mapping. */\nexport interface RegistryLoss {\n /** The registry the entry belongs to. */\n readonly registry: 'biome' | 'enchantment' | 'mob_effect' | 'potion';\n /** The Java identifier. */\n readonly javaId: string;\n /** The Bedrock identifier the entry falls back to, when one exists. */\n readonly bedrockFallback?: string;\n readonly reason: string;\n readonly reference: string;\n}\n\nconst END_BIOME = {\n registry: 'biome',\n bedrockFallback: 'minecraft:the_end',\n reason: \"Bedrock's single End biome (id 9) serves all five Java End biomes.\",\n reference: `${NOTE} section 6`\n} as const;\n\nconst BEDROCK_HAS_NO_EFFECT = {\n registry: 'mob_effect',\n reference: `${NOTE} section 3`\n} as const;\n\n/**\n * The reviewed losses in the remaining registries: the biome merges onto\n * Bedrock's shared ids, the one vanilla enchantment with no Bedrock id, and\n * the four mob effects and one potion Bedrock's pinned name lists do not\n * have.\n */\nexport const REGISTRY_LOSSES = [\n {\n registry: 'biome',\n javaId: 'minecraft:the_void',\n bedrockFallback: 'minecraft:river',\n reason: 'Bedrock has no void biome; Geyser maps it onto biome id 7, which is the river.',\n reference: `${NOTE} section 6`\n },\n { javaId: 'minecraft:end_barrens', ...END_BIOME },\n { javaId: 'minecraft:end_highlands', ...END_BIOME },\n { javaId: 'minecraft:end_midlands', ...END_BIOME },\n { javaId: 'minecraft:small_end_islands', ...END_BIOME },\n {\n registry: 'enchantment',\n javaId: 'minecraft:sweeping_edge',\n reason: 'The only vanilla Java enchantment with no Bedrock id; Geyser renders it as lore text with a glint.',\n reference: `${NOTE} section 3; GeyserMC/Geyser#3121`\n },\n {\n javaId: 'minecraft:dolphins_grace',\n reason: \"Bedrock gives a dolphin's boost no effect of its own; the swim speed is applied directly.\",\n ...BEDROCK_HAS_NO_EFFECT\n },\n {\n javaId: 'minecraft:glowing',\n reason: 'Bedrock has no glowing effect; the outline a Java client draws is one of the 44 client-decided differences.',\n ...BEDROCK_HAS_NO_EFFECT\n },\n {\n javaId: 'minecraft:luck',\n reason: 'Bedrock has no luck effect, and no loot table field it would weight.',\n ...BEDROCK_HAS_NO_EFFECT\n },\n {\n javaId: 'minecraft:unluck',\n reason: \"Bedrock has no bad luck effect; it is Java's luck effect with a negative amplifier and shares its fate.\",\n ...BEDROCK_HAS_NO_EFFECT\n },\n {\n registry: 'potion',\n javaId: 'minecraft:luck',\n reason: 'The luck potion is Java-only, because the luck effect it applies has no Bedrock counterpart.',\n reference: `${NOTE} section 3`\n }\n] as const satisfies readonly RegistryLoss[];\n\n/** A Bedrock biome the inverse direction cannot name in Java. */\nexport interface BedrockBiomeLoss {\n /** The Bedrock biome identifier. */\n readonly bedrockId: string;\n /**\n * The first pinned Java release with a biome that maps onto it. The loss holds for the tables\n * of older releases only; absent when no pinned Java release has one.\n */\n readonly javaSince?: string;\n readonly reason: string;\n readonly reference: string;\n}\n\nconst LEGACY_TERRAIN_VARIANT = {\n reason:\n 'A pre-1.18 terrain variant. Java 1.18 replaced the hills, shore, edge, mountain and ' +\n 'plateau biomes with continuous terrain, so Java 26.3 has no identifier for it; Bedrock ' +\n 'keeps the id for worlds generated before the change.',\n reference: `${NOTE} section 6`\n} as const;\n\nconst LEGACY_MUTATED_VARIANT = {\n reason:\n \"A pre-1.18 'mutated' terrain variant. Java 1.18 removed the mutated biomes along with \" +\n 'the rest of the old biome grid, so Java 26.3 has no identifier for it; Bedrock keeps ' +\n 'the id for worlds generated before the change.',\n reference: `${NOTE} section 6`\n} as const;\n\n/**\n * The Bedrock biomes {@link import('./registryMapping').bedrockBiomeToJava} cannot name in\n * Java, none of which any of Java 26.3's biome documents reaches.\n *\n * All but one are legacy terrain, kept so an old Bedrock world still reads back. A chunk only\n * carries one if it was generated by a Bedrock version older than the 1.18 terrain change, so\n * the inverse reports the loss rather than guessing which modern Java biome stands in for a\n * biome Java deleted. The other is `minecraft:ice_caves`, which Bedrock added after Java 26.3.\n */\nexport const BEDROCK_BIOME_LOSSES = [\n { bedrockId: 'minecraft:bamboo_jungle_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:birch_forest_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:birch_forest_hills_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:cold_taiga_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:cold_taiga_mutated', ...LEGACY_MUTATED_VARIANT },\n {\n bedrockId: 'minecraft:deep_warm_ocean',\n reason:\n 'The deep warm ocean never generated in either edition - Java removed it in 1.18 and ' +\n 'Bedrock leaves the id unreachable - so there is no Java biome to name it with.',\n reference: `${NOTE} section 6`\n },\n { bedrockId: 'minecraft:desert_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:desert_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:extreme_hills_edge', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:extreme_hills_plus_trees_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:forest_hills', ...LEGACY_TERRAIN_VARIANT },\n {\n bedrockId: 'minecraft:ice_caves',\n javaSince: '26.4-snapshot-10',\n reason:\n 'Listed from Bedrock 1.26.60 with id 196, and absent from Java 26.3. The pinned Bedrock ' +\n 'Dedicated Server sends no definition for it and ships no biome file for it, so no ' +\n 'vanilla world generates it yet.',\n reference: 'bedrock-samples v1.26.60.5 metadata/vanilladata_modules/mojang-biomes.json'\n },\n { bedrockId: 'minecraft:ice_mountains', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:jungle_edge_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:jungle_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:jungle_mutated', ...LEGACY_MUTATED_VARIANT },\n {\n bedrockId: 'minecraft:legacy_frozen_ocean',\n reason:\n \"Bedrock's own pre-1.13 frozen ocean, kept so a world generated before the Update \" +\n 'Aquatic ocean split still reads back. Java never had a second frozen ocean.',\n reference: `${NOTE} section 6`\n },\n { bedrockId: 'minecraft:mega_taiga_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:mesa_plateau', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:mesa_plateau_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:mesa_plateau_stone_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:mushroom_island_shore', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:redwood_taiga_hills_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:roofed_forest_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:savanna_plateau_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:swampland_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:taiga_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:taiga_mutated', ...LEGACY_MUTATED_VARIANT }\n] as const satisfies readonly BedrockBiomeLoss[];\n\n/**\n * A whole Java registry whose entries reach the Bedrock client but which\n * this package has no table for.\n *\n * The row is registry-wide rather than one row per entry because the gap is\n * the same for every entry: the value travels in Bedrock, and nothing here\n * decides what it travels as. The identifier still has to be an entry of the\n * pinned Java 26.3 registry, so a typo fails the load. `entries.count` is a\n * review baseline reported by the parity dashboard, not a gate on registry size.\n */\nexport interface UntranslatedRegistry {\n /** The registry as a datapack reference names it. */\n readonly registry: string;\n /** How many entries the pinned Java 26.3 data publishes for it. */\n readonly entries: { readonly count: number };\n /** What carries the value on the Bedrock side, which is what a later table has to produce. */\n readonly carrier: string;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * The three registries whose entries this package cannot name in Bedrock\n * yet.\n *\n * All three are pinned-source problems rather than design problems: Bedrock\n * holds each of these as a number or a short code decided in client code,\n * and neither GeyserMC/mappings nor the bedrock-samples metadata publishes\n * the correspondence, so there is nothing to generate a table from. Mapping\n * them means capturing the Bedrock side first, which is Phase 2 and Phase 3\n * work.\n */\nexport const UNTRANSLATED_REGISTRIES = [\n {\n registry: 'banner_pattern',\n entries: { count: 43 },\n carrier: \"the banner's block entity NBT, which lists patterns by a short code such as `bs` or `cr`\",\n reason: 'Bedrock names banner patterns by two-letter code rather than by identifier, and no pinned source publishes the pairing; Geyser keeps it in client code.',\n reference: `${NOTE} section 5`\n },\n {\n registry: 'instrument',\n entries: { count: 8 },\n carrier: \"the goat horn item's data value, 0 to 7\",\n reason: 'Bedrock selects a goat horn sound by the item data value, in the order the eight horns were added; the identifiers exist only on the Java side.',\n reference: `${NOTE} section 5`\n },\n {\n registry: 'painting_variant',\n entries: { count: 51 },\n carrier: \"the painting entity's `Motive` string, which is a resource pack name rather than a registry id\",\n reason: 'Bedrock paintings are named by the resource pack texture they draw, so the set a client knows is whatever its pack ships; the pinned metadata lists no painting registry.',\n reference: `${NOTE} section 5`\n }\n] as const satisfies readonly UntranslatedRegistry[];\n\n/** What a Java block entity's field runs into on the Bedrock side. */\nexport type BlockEntityContentLossKind =\n /** Bedrock has no tag for it, and nothing else on the block entity carries it. */\n | 'unrepresentable'\n /** Bedrock keeps a coarser form of the same fact, named in the reason. */\n | 'coarsened'\n /** Bedrock has the tag but only in a shape this server cannot resolve the Java value into. */\n | 'unresolvable';\n\n/** A field of a Java block entity that does not reach the Bedrock block entity. */\nexport interface BlockEntityContentLoss {\n /** The Java block entity type, for example `minecraft:sign`. */\n readonly javaType: string;\n /** The Java NBT field that is dropped, as the saved compound spells it. */\n readonly field: string;\n readonly kind: BlockEntityContentLossKind;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * The fields a Java block entity's contents lose on the way to a Bedrock one.\n *\n * `blockentity/javaBlockEntityContent.ts` in `@jsprismarine/prismarine` translates the rest:\n * a banner's color and patterns, a sign's two faces, a decorated pot's four sherds, a vault's\n * key, a spawner's mob and every container's stacks. These five are what it knowingly drops,\n * and each is dropped because Bedrock has nowhere to put it rather than because nobody wrote\n * the code.\n *\n * The counts in the reasons were measured over the 1511 Java 26.3 structure templates, which\n * declare 1124 block entities once the jigsaws and structure blocks that are consumed during\n * placement are set aside.\n */\nexport const BLOCK_ENTITY_CONTENT_LOSSES = [\n {\n javaType: 'minecraft:sign',\n field: 'allow_op_features',\n kind: 'unrepresentable',\n reason: 'A Java sign may be allowed to run the click events an operator wrote into its text. Bedrock signs run nothing, so there is no flag to carry. All five signs in the structure templates set it.',\n reference: `${NOTE} section 7`\n },\n {\n javaType: 'minecraft:sign',\n field: 'filtered_messages',\n kind: 'unrepresentable',\n reason: \"Java keeps a second, profanity-filtered copy of a sign's four lines for Realms. A Bedrock sign face holds one string, so only the unfiltered copy travels. One template sign carries the second copy.\",\n reference: `${NOTE} section 7`\n },\n {\n javaType: 'minecraft:furnace',\n field: 'RecipesUsed',\n kind: 'coarsened',\n reason: 'Java tallies how many of each recipe a furnace smelted, to hand back the right experience. Bedrock keeps one number, `StoredXPInt`, and no recipe names. The 48 furnaces, blast furnaces and smokers in the templates carry the tally; one of them has anything in it.',\n reference: `${NOTE} section 7`\n },\n {\n javaType: 'minecraft:trial_spawner',\n field: 'normal_config',\n kind: 'unresolvable',\n reason: \"Java may write a trial spawner's two configurations as a reference into its `trial_spawner` registry, and all 14 in the templates do. Bedrock has no reference form and takes the configuration inline, so resolving one means reading the Java registry, which this server does not load. A configuration written inline translates.\",\n reference: `${NOTE} section 7`\n },\n {\n javaType: 'minecraft:banner',\n field: 'patterns',\n kind: 'unrepresentable',\n reason: 'Bedrock draws banner patterns from its own client assets and names them by a short code, so a pattern a datapack shipped has no code to be named by and the layer is dropped. Every pattern Java 26.3 publishes has one; no template uses a pattern that does not.',\n reference: `${NOTE} section 5`\n },\n {\n javaType: 'minecraft:brewing_stand',\n field: 'Items[].components.minecraft:potion_contents',\n kind: 'coarsened',\n reason: \"Bedrock tells its potions apart by the stack's data value rather than by name, and no pinned source publishes which number is which potion, so a stack of a named potion arrives as the plain bottle. Three stacks in the templates are potions: two of strong healing in an end city, one splash potion of weakness in an igloo.\",\n reference: `${NOTE} section 3`\n }\n] as const satisfies readonly BlockEntityContentLoss[];\n"],"mappings":";;;;;;;;;;;;AAYA,IAAM,OAAO;;;;;;AAiCb,IAAa,2BAA2B;CACpC;EACI,UAAU;EACV,QAAQ,EAAE,OAAO,IAAI;EACrB,UAAU;EACV,QAAQ;EACR,WAAW,GAAG,KAAK;CACvB;CACA;EACI,UAAU;EACV,QAAQ,EAAE,OAAO,GAAG;EACpB,UAAU;EACV,QAAQ;EACR,WAAW,GAAG,KAAK;CACvB;CACA;EACI,UAAU;EACV,QAAQ;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACJ;EACA,UA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src/lossList.ts"],"sourcesContent":["/**\n * The reviewed loss allow list: every known place where the Java 26.3 to\n * pinned Bedrock release mapping loses information, each with a reason and a\n * reference. The property tests fail when a loss appears that is not listed\n * here, and also when a listed loss stops occurring, so the list stays exact\n * in both directions.\n *\n * The references cite `docs/research/java-to-bedrock-translation.md` (the\n * measured join this package reproduces) by section, and GeyserMC issues\n * where one documents the loss directly.\n */\n\nconst NOTE = 'docs/research/java-to-bedrock-translation.md';\n\n/** Where the information a collapsed Java block property reappears, if anywhere. */\nexport type BlockPropertyRecovery =\n /** Bedrock's second per-sub-chunk block storage layer carries it. */\n | 'second-layer'\n /** Bedrock block entity NBT carries it. */\n | 'block-entity'\n /** The Bedrock client recomputes it from neighboring blocks. */\n | 'client-computed'\n /** Nothing carries it; in every listed case neither edition renders it. */\n | 'none';\n\n/**\n * A Java block state property that the Bedrock block state cannot express:\n * two Java states differing only in this property map to one Bedrock state\n * for every state of the listed blocks.\n */\nexport interface DroppedBlockProperty {\n /** The Java property name. */\n readonly property: string;\n /** Every affected Java block, or only the count where the list is too long to review name by name. */\n readonly blocks: readonly string[] | { readonly count: number };\n readonly recovery: BlockPropertyRecovery;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * Java block properties the Bedrock state drops for every state of the listed\n * blocks. The counts and lists are verified against the generated table by\n * the round-trip property test.\n */\nexport const DROPPED_BLOCK_PROPERTIES = [\n {\n property: 'waterlogged',\n blocks: { count: 504 },\n recovery: 'second-layer',\n reason: 'Bedrock has no waterlogged flag; water travels in the second block storage layer.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'powered',\n blocks: { count: 72 },\n recovery: 'none',\n reason: 'Doors, trapdoors, fence gates, pressure plates and heads render identically powered or not in both editions.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'facing',\n blocks: [\n 'minecraft:black_shulker_box',\n 'minecraft:blue_shulker_box',\n 'minecraft:brown_shulker_box',\n 'minecraft:cyan_shulker_box',\n 'minecraft:gray_shulker_box',\n 'minecraft:green_shulker_box',\n 'minecraft:light_blue_shulker_box',\n 'minecraft:light_gray_shulker_box',\n 'minecraft:lime_shulker_box',\n 'minecraft:magenta_shulker_box',\n 'minecraft:moving_piston',\n 'minecraft:orange_shulker_box',\n 'minecraft:pink_shulker_box',\n 'minecraft:purple_shulker_box',\n 'minecraft:red_shulker_box',\n 'minecraft:shulker_box',\n 'minecraft:white_shulker_box',\n 'minecraft:yellow_shulker_box'\n ],\n recovery: 'block-entity',\n reason: 'Shulker box facing travels in Bedrock block entity NBT, not the block state.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'distance',\n blocks: [\n 'minecraft:acacia_leaves',\n 'minecraft:azalea_leaves',\n 'minecraft:birch_leaves',\n 'minecraft:cherry_leaves',\n 'minecraft:dark_oak_leaves',\n 'minecraft:flowering_azalea_leaves',\n 'minecraft:jungle_leaves',\n 'minecraft:mangrove_leaves',\n 'minecraft:oak_leaves',\n 'minecraft:orange_poplar_leaves',\n 'minecraft:pale_oak_leaves',\n 'minecraft:red_poplar_leaves',\n 'minecraft:spruce_leaves',\n 'minecraft:yellow_poplar_leaves'\n ],\n recovery: 'client-computed',\n reason: 'The Bedrock client recomputes leaf decay distance from neighbors.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'type',\n blocks: [\n 'minecraft:chest',\n 'minecraft:copper_chest',\n 'minecraft:exposed_copper_chest',\n 'minecraft:moving_piston',\n 'minecraft:oxidized_copper_chest',\n 'minecraft:trapped_chest',\n 'minecraft:waxed_copper_chest',\n 'minecraft:waxed_exposed_copper_chest',\n 'minecraft:waxed_oxidized_copper_chest',\n 'minecraft:waxed_weathered_copper_chest',\n 'minecraft:weathered_copper_chest'\n ],\n recovery: 'block-entity',\n reason: 'The double-chest pair position travels in Bedrock block entity NBT.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'copper_golem_pose',\n blocks: [\n 'minecraft:copper_golem_statue',\n 'minecraft:exposed_copper_golem_statue',\n 'minecraft:oxidized_copper_golem_statue',\n 'minecraft:waxed_copper_golem_statue',\n 'minecraft:waxed_exposed_copper_golem_statue',\n 'minecraft:waxed_oxidized_copper_golem_statue',\n 'minecraft:waxed_weathered_copper_golem_statue',\n 'minecraft:weathered_copper_golem_statue'\n ],\n recovery: 'block-entity',\n reason: 'Copper golem poses are block states on Java and block entity NBT on Bedrock.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'rotation',\n blocks: [\n 'minecraft:creeper_head',\n 'minecraft:dragon_head',\n 'minecraft:piglin_head',\n 'minecraft:player_head',\n 'minecraft:skeleton_skull',\n 'minecraft:wither_skeleton_skull',\n 'minecraft:zombie_head'\n ],\n recovery: 'block-entity',\n reason: 'Skull rotation travels in Bedrock block entity NBT as degrees.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'power',\n blocks: ['minecraft:calibrated_sculk_sensor', 'minecraft:sculk_sensor', 'minecraft:target'],\n recovery: 'none',\n reason: 'The output power level is not visual on these blocks.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'up',\n blocks: ['minecraft:vine'],\n recovery: 'client-computed',\n reason: 'The Bedrock client computes block connections from neighbors.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'snowy',\n blocks: ['minecraft:grass_block', 'minecraft:mycelium', 'minecraft:podzol'],\n recovery: 'client-computed',\n reason: 'The Bedrock client computes the snowy top texture from the block above.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'stage',\n blocks: ['minecraft:bamboo', 'minecraft:mangrove_propagule'],\n recovery: 'none',\n reason: 'The sapling growth stage is not visual.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'signal_fire',\n blocks: ['minecraft:campfire', 'minecraft:soul_campfire'],\n recovery: 'none',\n reason: 'Whether a campfire sits on hay is not part of the Bedrock block state.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'extended',\n blocks: ['minecraft:piston', 'minecraft:sticky_piston'],\n recovery: 'none',\n reason: 'Bedrock tracks piston extension in the piston block entity.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'cracked',\n blocks: ['minecraft:decorated_pot'],\n recovery: 'block-entity',\n reason: 'Decorated pot detail travels in Bedrock block entity NBT.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'has_record',\n blocks: ['minecraft:jukebox'],\n recovery: 'block-entity',\n reason: 'The inserted disc travels in Bedrock block entity NBT.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'has_book',\n blocks: ['minecraft:lectern'],\n recovery: 'block-entity',\n reason: 'The held book travels in Bedrock block entity NBT.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'instrument',\n blocks: ['minecraft:note_block'],\n recovery: 'none',\n reason: 'Bedrock derives the note block instrument from the block below.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'note',\n blocks: ['minecraft:note_block'],\n recovery: 'block-entity',\n reason: 'The pitch travels in Bedrock block entity NBT.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'short',\n blocks: ['minecraft:piston_head'],\n recovery: 'none',\n reason: 'The shortened mid-push arm is not part of the Bedrock block state.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'locked',\n blocks: ['minecraft:repeater'],\n recovery: 'none',\n reason: 'Repeater locking is recomputed from neighboring repeaters.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'bottom',\n blocks: ['minecraft:scaffolding'],\n recovery: 'client-computed',\n reason: 'The Bedrock client computes the floating-scaffolding bottom face itself.',\n reference: `${NOTE} section 2`\n },\n {\n property: 'mode',\n blocks: ['minecraft:test_block'],\n recovery: 'none',\n reason: 'The test block has no Bedrock concept at all; see BLOCK_LOSSES.',\n reference: `${NOTE} section 2`\n }\n] as const satisfies readonly DroppedBlockProperty[];\n\n/**\n * A Java block whose state property collapses only for some of its values,\n * so the property is dropped for part of the block's state space rather\n * than all of it.\n */\nexport interface PartialBlockPropertyCollapse {\n /** The Java block identifier. */\n readonly block: string;\n /** The properties whose collapse depends on the other properties' values. */\n readonly properties: readonly string[];\n readonly reason: string;\n readonly reference: string;\n}\n\nconst BUTTON_COLLAPSE = {\n properties: ['facing'],\n reason: \"Bedrock's facing_direction 0 and 1 (floor and ceiling) ignore the horizontal facing Java keeps.\",\n reference: `${NOTE} section 2`\n} as const;\n\nconst MUSHROOM_COLLAPSE = {\n properties: ['down', 'east', 'north', 'south', 'up', 'west'],\n reason: \"Java's 64 face combinations collapse onto Bedrock's huge_mushroom_bits values.\",\n reference: `${NOTE} section 2`\n} as const;\n\n/**\n * Blocks where a state property collapses for only part of the state space.\n * The round-trip property test accepts a non-identity round trip for these\n * blocks only on the listed properties.\n */\nexport const PARTIAL_BLOCK_PROPERTY_COLLAPSES = [\n { block: 'minecraft:acacia_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:bamboo_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:birch_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:cherry_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:crimson_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:dark_oak_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:jungle_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:mangrove_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:oak_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:pale_oak_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:polished_blackstone_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:poplar_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:spruce_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:stone_button', ...BUTTON_COLLAPSE },\n { block: 'minecraft:warped_button', ...BUTTON_COLLAPSE },\n {\n block: 'minecraft:lever',\n properties: ['facing', 'powered'],\n reason: \"Bedrock's lever_direction merges the floor and ceiling facings, and the powered bit folds into the direction for some orientations.\",\n reference: `${NOTE} section 2`\n },\n { block: 'minecraft:brown_mushroom_block', ...MUSHROOM_COLLAPSE },\n { block: 'minecraft:mushroom_stem', ...MUSHROOM_COLLAPSE },\n { block: 'minecraft:red_mushroom_block', ...MUSHROOM_COLLAPSE }\n] as const satisfies readonly PartialBlockPropertyCollapse[];\n\n/**\n * A Bedrock block state whose values no single Java property spells, so there is no word\n * vocabulary for it in {@link bedrockBlockStates}.\n */\nexport interface BlockStateLoss {\n /** The Bedrock state name. */\n readonly state: string;\n /** Every Bedrock block that carries the state this way. */\n readonly blocks: readonly string[];\n readonly reason: string;\n readonly reference: string;\n}\n\n/** The fifteen Bedrock buttons; Bedrock spells the oak one `wooden_button`. */\nconst BEDROCK_BUTTONS = [\n 'minecraft:acacia_button',\n 'minecraft:bamboo_button',\n 'minecraft:birch_button',\n 'minecraft:cherry_button',\n 'minecraft:crimson_button',\n 'minecraft:dark_oak_button',\n 'minecraft:jungle_button',\n 'minecraft:mangrove_button',\n 'minecraft:pale_oak_button',\n 'minecraft:polished_blackstone_button',\n 'minecraft:poplar_button',\n 'minecraft:spruce_button',\n 'minecraft:stone_button',\n 'minecraft:warped_button',\n 'minecraft:wooden_button'\n] as const;\n\nconst PACKED_FACES = {\n reason: 'Bedrock packs the six face booleans Java carries separately into the bits of one number.',\n reference: `${NOTE} section 2`\n} as const;\n\n/**\n * The Bedrock states a caller cannot write in Java's words.\n *\n * {@link bedrockBlockStates} reads every other state's vocabulary out\n * of the block mapping, by finding the one Java property whose values pick its values. These\n * twenty-seven (block, state) pairs have no such property: Bedrock either folds two Java\n * properties into one state or packs several booleans into one number, so a word has nothing to\n * translate to. A caller that holds one of them keeps the Bedrock value it read.\n */\nexport const BLOCK_STATE_LOSSES = [\n {\n state: 'facing_direction',\n blocks: BEDROCK_BUTTONS,\n reason:\n \"Bedrock's button facing is the direction the button sticks out of its support, which \" +\n 'Java spells as `face` and `facing` together: a floor button is 1 whichever way it faces.',\n reference: `${NOTE} section 2`\n },\n {\n state: 'huge_mushroom_bits',\n blocks: ['minecraft:brown_mushroom_block', 'minecraft:mushroom_stem', 'minecraft:red_mushroom_block'],\n ...PACKED_FACES\n },\n {\n state: 'multi_face_direction_bits',\n blocks: ['minecraft:glow_lichen', 'minecraft:resin_clump', 'minecraft:sculk_vein'],\n ...PACKED_FACES\n },\n { state: 'books_stored', blocks: ['minecraft:chiseled_bookshelf'], ...PACKED_FACES },\n { state: 'vine_direction_bits', blocks: ['minecraft:vine'], ...PACKED_FACES },\n {\n state: 'facing_direction',\n blocks: ['minecraft:jigsaw'],\n reason:\n \"Java's twelve jigsaw orientations are a direction and a roll together; Bedrock keeps \" +\n 'the direction here and the roll in `rotation`, so neither reads back as an orientation.',\n reference: `${NOTE} section 2`\n },\n {\n state: 'rotation',\n blocks: ['minecraft:jigsaw'],\n reason: \"The roll half of Java's jigsaw orientation; see this list's `facing_direction` entry.\",\n reference: `${NOTE} section 2`\n },\n {\n state: 'lever_direction',\n blocks: ['minecraft:lever'],\n reason: \"Java's `face` and `facing` together, the same fold as the button's.\",\n reference: `${NOTE} section 2`\n },\n {\n state: 'open_bit',\n blocks: ['minecraft:lever'],\n reason:\n 'A floor or ceiling lever has one Bedrock direction for two Java facings, and the ' +\n 'GeyserMC join flips `open_bit` to keep south and east apart, so Java `powered` does ' +\n 'not spell it on its own.',\n reference: `${NOTE} section 2`\n }\n] as const satisfies readonly BlockStateLoss[];\n\n/** A Bedrock identifier that several Java blocks legitimately collapse onto. */\nexport interface BlockMerge {\n /** The shared Bedrock identifier. */\n readonly bedrockId: string;\n readonly reason: string;\n readonly reference: string;\n}\n\nconst WALL_VARIANT = {\n reason: 'Bedrock uses one block for the floor and wall variants; the placement travels in the block state.',\n reference: `${NOTE} section 2`\n} as const;\n\nconst PLANT_BODY = {\n reason: \"Bedrock uses one block where Java splits a plant into a head and a body ('_plant') block.\",\n reference: `${NOTE} section 2`\n} as const;\n\n/**\n * Bedrock identifiers that receive more than one Java block. The round-trip\n * property test accepts a cross-block round trip only for these targets.\n */\nexport const BLOCK_MERGES = [\n { bedrockId: 'minecraft:acacia_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:air',\n reason: \"Java's air, cave_air and void_air are one Bedrock air.\",\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:bamboo_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:bed',\n reason: 'The 16 Java bed colors are one Bedrock bed; the color travels in block entity NBT.',\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:big_dripleaf', ...PLANT_BODY },\n { bedrockId: 'minecraft:birch_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:cauldron',\n reason: \"Java's empty, water, lava and powder snow cauldrons are one Bedrock cauldron with a liquid state.\",\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:cave_vines', ...PLANT_BODY },\n { bedrockId: 'minecraft:cherry_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:copper_torch', ...WALL_VARIANT },\n { bedrockId: 'minecraft:creeper_head', ...WALL_VARIANT },\n { bedrockId: 'minecraft:crimson_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:dark_oak_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:dragon_head', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:flower_pot',\n reason: 'The pot and all 39 potted plants are one Bedrock flower pot; the contents travel in block entity NBT.',\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:jungle_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:kelp', ...PLANT_BODY },\n { bedrockId: 'minecraft:mangrove_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:melon_stem',\n reason: \"Java's attached stem is a Bedrock stem state, not a separate block.\",\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:oak_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:pale_oak_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:piglin_head', ...WALL_VARIANT },\n { bedrockId: 'minecraft:player_head', ...WALL_VARIANT },\n { bedrockId: 'minecraft:poplar_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:pumpkin_stem',\n reason: \"Java's attached stem is a Bedrock stem state, not a separate block.\",\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:redstone_torch', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:seagrass',\n reason: \"Java's tall seagrass halves are Bedrock seagrass states.\",\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:skeleton_skull', ...WALL_VARIANT },\n { bedrockId: 'minecraft:soul_torch', ...WALL_VARIANT },\n { bedrockId: 'minecraft:spruce_hanging_sign', ...WALL_VARIANT },\n {\n bedrockId: 'minecraft:standing_banner',\n reason: 'The 16 Java banner colors are one Bedrock banner; the color travels in block entity NBT.',\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:torch', ...WALL_VARIANT },\n { bedrockId: 'minecraft:twisting_vines', ...PLANT_BODY },\n {\n bedrockId: 'minecraft:unknown',\n reason: 'The two Java test blocks have no Bedrock concept; see BLOCK_LOSSES.',\n reference: `${NOTE} section 2`\n },\n {\n bedrockId: 'minecraft:unlit_redstone_torch',\n ...WALL_VARIANT\n },\n {\n bedrockId: 'minecraft:wall_banner',\n reason: 'The 16 Java wall banner colors are one Bedrock wall banner; the color travels in block entity NBT.',\n reference: `${NOTE} section 2`\n },\n { bedrockId: 'minecraft:warped_hanging_sign', ...WALL_VARIANT },\n { bedrockId: 'minecraft:weeping_vines', ...PLANT_BODY },\n { bedrockId: 'minecraft:wither_skeleton_skull', ...WALL_VARIANT },\n { bedrockId: 'minecraft:zombie_head', ...WALL_VARIANT }\n] as const satisfies readonly BlockMerge[];\n\n/** A Java block with no Bedrock concept at all. */\nexport interface BlockLoss {\n /** The Java block identifier. */\n readonly javaId: string;\n /** The Bedrock identifier every state falls back to. */\n readonly bedrockFallback: string;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * The Java blocks with no Bedrock representation. All five of their states\n * map to `minecraft:unknown`, and a lookup reports the loss.\n */\nexport const BLOCK_LOSSES = [\n {\n javaId: 'minecraft:test_block',\n bedrockFallback: 'minecraft:unknown',\n reason: 'Test blocks do not exist on Bedrock.',\n reference: `${NOTE} section 2; GeyserMC/Geyser#6164`\n },\n {\n javaId: 'minecraft:test_instance_block',\n bedrockFallback: 'minecraft:unknown',\n reason: 'Test instance blocks do not exist on Bedrock.',\n reference: `${NOTE} section 2; GeyserMC/Geyser#6164`\n }\n] as const satisfies readonly BlockLoss[];\n\n/** A Java item whose identity does not survive the mapping. */\nexport interface ItemLoss {\n /** The Java item identifier. */\n readonly javaId: string;\n /** The Bedrock identifier the item falls back to. */\n readonly bedrockFallback: string;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * The genuinely lossy item merges: a Bedrock player sees the fallback item\n * with none of the Java item's identity.\n */\nexport const ITEM_LOSSES = [\n {\n javaId: 'minecraft:spectral_arrow',\n bedrockFallback: 'minecraft:arrow',\n reason: 'Bedrock has no spectral arrow; it becomes a plain arrow.',\n reference: `${NOTE} section 3`\n },\n {\n javaId: 'minecraft:debug_stick',\n bedrockFallback: 'minecraft:stick',\n reason: 'Bedrock has no debug stick; it becomes a plain stick.',\n reference: `${NOTE} section 3`\n },\n {\n javaId: 'minecraft:knowledge_book',\n bedrockFallback: 'minecraft:book',\n reason: 'Bedrock has no knowledge book; it becomes a plain book.',\n reference: `${NOTE} section 3`\n },\n {\n javaId: 'minecraft:furnace_minecart',\n bedrockFallback: 'minecraft:hopper_minecart',\n reason: 'Bedrock has no furnace minecart item.',\n reference: `${NOTE} section 3`\n },\n {\n javaId: 'minecraft:test_block',\n bedrockFallback: 'minecraft:unknown',\n reason: 'Test blocks do not exist on Bedrock.',\n reference: `${NOTE} section 3; GeyserMC/Geyser#6164`\n },\n {\n javaId: 'minecraft:test_instance_block',\n bedrockFallback: 'minecraft:unknown',\n reason: 'Test instance blocks do not exist on Bedrock.',\n reference: `${NOTE} section 3; GeyserMC/Geyser#6164`\n }\n] as const satisfies readonly ItemLoss[];\n\n/** A Bedrock item identifier several Java items share. */\nexport interface ItemMerge {\n /** The shared Bedrock identifier. */\n readonly bedrockId: string;\n /** How the merged Java identity is recovered, when it is. */\n readonly recovery: string;\n readonly reference: string;\n}\n\n/**\n * Bedrock item identifiers that receive more than one Java item. The\n * round-trip property test accepts a non-identity round trip only for these.\n */\nexport const ITEM_MERGES = [\n {\n bedrockId: 'minecraft:arrow',\n recovery: 'Tipped arrows recover from potion NBT; spectral arrows do not recover.',\n reference: `${NOTE} section 3`\n },\n { bedrockId: 'minecraft:banner', recovery: 'The color recovers from Bedrock NBT.', reference: `${NOTE} section 3` },\n { bedrockId: 'minecraft:bed', recovery: 'The color recovers from Bedrock NBT.', reference: `${NOTE} section 3` },\n { bedrockId: 'minecraft:book', recovery: 'The knowledge book does not recover.', reference: `${NOTE} section 3` },\n {\n bedrockId: 'minecraft:filled_map',\n recovery: 'The 16 structure locator maps recover from map NBT.',\n reference: `${NOTE} section 3`\n },\n {\n bedrockId: 'minecraft:hopper_minecart',\n recovery: 'The furnace minecart does not recover.',\n reference: `${NOTE} section 3`\n },\n { bedrockId: 'minecraft:stick', recovery: 'The debug stick does not recover.', reference: `${NOTE} section 3` },\n {\n bedrockId: 'minecraft:unknown',\n recovery: 'The two test block items do not recover.',\n reference: `${NOTE} section 3`\n }\n] as const satisfies readonly ItemMerge[];\n\n/** How a Java entity type fails to reach Bedrock as itself. */\nexport type EntityLossKind =\n /** Shown to the Bedrock client as a different entity. */\n | 'rerender'\n /** No Bedrock representation at all. */\n | 'unrepresentable'\n /** Bedrock models it as a block, not an entity. */\n | 'block';\n\n/** A Java entity type that cannot reach the Bedrock client as itself. */\nexport interface EntityLoss {\n /** The Java entity type identifier. */\n readonly javaId: string;\n readonly kind: EntityLossKind;\n /** The Bedrock entity (or block) shown instead, when one exists. */\n readonly bedrockFallback?: string;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * The Java entity types without a Bedrock entity of their own against the\n * pinned Bedrock identifier list. The research note counts ten re-renders\n * against Geyser's 1.26.50 data; three of those resolve here instead:\n * `evoker` maps to its real Bedrock name `evocation_illager`, and\n * `lingering_potion` and `trader_llama` exist in the pinned identifier\n * list under their own names.\n */\nexport const ENTITY_LOSSES = [\n {\n javaId: 'minecraft:text_display',\n kind: 'rerender',\n bedrockFallback: 'minecraft:armor_stand',\n reason: 'Bedrock has no display entities; Geyser shows text displays as armor stands.',\n reference: `${NOTE} section 4; GeyserMC/Geyser#3810`\n },\n {\n javaId: 'minecraft:interaction',\n kind: 'rerender',\n bedrockFallback: 'minecraft:armor_stand',\n reason: 'Bedrock has no interaction entity.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:spectral_arrow',\n kind: 'rerender',\n bedrockFallback: 'minecraft:arrow',\n reason: 'Bedrock has no spectral arrow entity.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:furnace_minecart',\n kind: 'rerender',\n bedrockFallback: 'minecraft:minecart',\n reason: 'Bedrock has no furnace minecart.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:spawner_minecart',\n kind: 'rerender',\n bedrockFallback: 'minecraft:minecart',\n reason: 'Bedrock has no spawner minecart.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:giant',\n kind: 'rerender',\n bedrockFallback: 'minecraft:zombie',\n reason: 'Bedrock has no giant; it is shown as a zombie.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:illusioner',\n kind: 'rerender',\n bedrockFallback: 'minecraft:evocation_illager',\n reason: 'Bedrock has no illusioner; it is shown as an evoker.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:block_display',\n kind: 'unrepresentable',\n reason: 'Bedrock has no display entities and no stand-in renders a block.',\n reference: `${NOTE} section 4; GeyserMC/Geyser#3810`\n },\n {\n javaId: 'minecraft:item_display',\n kind: 'unrepresentable',\n reason: 'Bedrock has no display entities and no stand-in renders an item.',\n reference: `${NOTE} section 4; GeyserMC/Geyser#3810`\n },\n {\n javaId: 'minecraft:marker',\n kind: 'unrepresentable',\n reason: 'Markers render in neither edition and are only sent inside non-vanilla entity type tags.',\n reference: `${NOTE} section 4`\n },\n {\n javaId: 'minecraft:mannequin',\n kind: 'unrepresentable',\n reason: 'Java 26.3 added the mannequin and the pinned Bedrock identifier list has no counterpart; listed rather than guessed.',\n reference: 'reports/registries.json (Java 26.3) against entity_identifiers (BDS 1.26.51.1)'\n },\n {\n javaId: 'minecraft:item_frame',\n kind: 'block',\n bedrockFallback: 'minecraft:frame',\n reason: 'Item frames are entities on Java and blocks on Bedrock.',\n reference: `${NOTE} section 2`\n },\n {\n javaId: 'minecraft:glow_item_frame',\n kind: 'block',\n bedrockFallback: 'minecraft:glow_frame',\n reason: 'Glow item frames are entities on Java and blocks on Bedrock.',\n reference: `${NOTE} section 2`\n }\n] as const satisfies readonly EntityLoss[];\n\n/** A Bedrock entity identifier several Java entity types share. */\nexport interface EntityMerge {\n /** The shared Bedrock identifier. */\n readonly bedrockId: string;\n /** How the merged Java identity is recovered. */\n readonly recovery: string;\n readonly reference: string;\n}\n\n/**\n * Bedrock entity identifiers that receive more than one Java entity type.\n * The round-trip property test accepts a non-identity round trip only for\n * these.\n */\nexport const ENTITY_MERGES = [\n {\n bedrockId: 'minecraft:boat',\n recovery: \"Java's eleven wooden boats and rafts are one Bedrock boat; the wood travels as a variant.\",\n reference: `${NOTE} section 4`\n },\n {\n bedrockId: 'minecraft:chest_boat',\n recovery:\n \"Java's eleven wooden chest boats and rafts are one Bedrock chest boat; the wood travels as a variant.\",\n reference: `${NOTE} section 4`\n }\n] as const satisfies readonly EntityMerge[];\n\n/** A Java registry entry whose identity does not survive the mapping. */\nexport interface RegistryLoss {\n /** The registry the entry belongs to. */\n readonly registry: 'biome' | 'enchantment' | 'mob_effect' | 'potion';\n /** The Java identifier. */\n readonly javaId: string;\n /** The Bedrock identifier the entry falls back to, when one exists. */\n readonly bedrockFallback?: string;\n readonly reason: string;\n readonly reference: string;\n}\n\nconst END_BIOME = {\n registry: 'biome',\n bedrockFallback: 'minecraft:the_end',\n reason: \"Bedrock's single End biome (id 9) serves all five Java End biomes.\",\n reference: `${NOTE} section 6`\n} as const;\n\nconst BEDROCK_HAS_NO_EFFECT = {\n registry: 'mob_effect',\n reference: `${NOTE} section 3`\n} as const;\n\n/**\n * The reviewed losses in the remaining registries: the biome merges onto\n * Bedrock's shared ids, the one vanilla enchantment with no Bedrock id, and\n * the four mob effects and one potion Bedrock's pinned name lists do not\n * have.\n */\nexport const REGISTRY_LOSSES = [\n {\n registry: 'biome',\n javaId: 'minecraft:the_void',\n bedrockFallback: 'minecraft:river',\n reason: 'Bedrock has no void biome; Geyser maps it onto biome id 7, which is the river.',\n reference: `${NOTE} section 6`\n },\n { javaId: 'minecraft:end_barrens', ...END_BIOME },\n { javaId: 'minecraft:end_highlands', ...END_BIOME },\n { javaId: 'minecraft:end_midlands', ...END_BIOME },\n { javaId: 'minecraft:small_end_islands', ...END_BIOME },\n {\n registry: 'enchantment',\n javaId: 'minecraft:sweeping_edge',\n reason: 'The only vanilla Java enchantment with no Bedrock id; Geyser renders it as lore text with a glint.',\n reference: `${NOTE} section 3; GeyserMC/Geyser#3121`\n },\n {\n javaId: 'minecraft:dolphins_grace',\n reason: \"Bedrock gives a dolphin's boost no effect of its own; the swim speed is applied directly.\",\n ...BEDROCK_HAS_NO_EFFECT\n },\n {\n javaId: 'minecraft:glowing',\n reason: 'Bedrock has no glowing effect; the outline a Java client draws is one of the 44 client-decided differences.',\n ...BEDROCK_HAS_NO_EFFECT\n },\n {\n javaId: 'minecraft:luck',\n reason: 'Bedrock has no luck effect, and no loot table field it would weight.',\n ...BEDROCK_HAS_NO_EFFECT\n },\n {\n javaId: 'minecraft:unluck',\n reason: \"Bedrock has no bad luck effect; it is Java's luck effect with a negative amplifier and shares its fate.\",\n ...BEDROCK_HAS_NO_EFFECT\n },\n {\n registry: 'potion',\n javaId: 'minecraft:luck',\n reason: 'The luck potion is Java-only, because the luck effect it applies has no Bedrock counterpart.',\n reference: `${NOTE} section 3`\n }\n] as const satisfies readonly RegistryLoss[];\n\n/** A Bedrock biome the inverse direction cannot name in Java. */\nexport interface BedrockBiomeLoss {\n /** The Bedrock biome identifier. */\n readonly bedrockId: string;\n /**\n * The first pinned Java release with a biome that maps onto it. The loss holds for the tables\n * of older releases only; absent when no pinned Java release has one.\n */\n readonly javaSince?: string;\n readonly reason: string;\n readonly reference: string;\n}\n\nconst LEGACY_TERRAIN_VARIANT = {\n reason:\n 'A pre-1.18 terrain variant. Java 1.18 replaced the hills, shore, edge, mountain and ' +\n 'plateau biomes with continuous terrain, so Java 26.3 has no identifier for it; Bedrock ' +\n 'keeps the id for worlds generated before the change.',\n reference: `${NOTE} section 6`\n} as const;\n\nconst LEGACY_MUTATED_VARIANT = {\n reason:\n \"A pre-1.18 'mutated' terrain variant. Java 1.18 removed the mutated biomes along with \" +\n 'the rest of the old biome grid, so Java 26.3 has no identifier for it; Bedrock keeps ' +\n 'the id for worlds generated before the change.',\n reference: `${NOTE} section 6`\n} as const;\n\n/**\n * The Bedrock biomes {@link bedrockBiomeToJava} cannot name in\n * Java, none of which any of Java 26.3's biome documents reaches.\n *\n * All but one are legacy terrain, kept so an old Bedrock world still reads back. A chunk only\n * carries one if it was generated by a Bedrock version older than the 1.18 terrain change, so\n * the inverse reports the loss rather than guessing which modern Java biome stands in for a\n * biome Java deleted. The other is `minecraft:ice_caves`, which Bedrock added after Java 26.3.\n */\nexport const BEDROCK_BIOME_LOSSES = [\n { bedrockId: 'minecraft:bamboo_jungle_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:birch_forest_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:birch_forest_hills_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:cold_taiga_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:cold_taiga_mutated', ...LEGACY_MUTATED_VARIANT },\n {\n bedrockId: 'minecraft:deep_warm_ocean',\n reason:\n 'The deep warm ocean never generated in either edition - Java removed it in 1.18 and ' +\n 'Bedrock leaves the id unreachable - so there is no Java biome to name it with.',\n reference: `${NOTE} section 6`\n },\n { bedrockId: 'minecraft:desert_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:desert_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:extreme_hills_edge', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:extreme_hills_plus_trees_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:forest_hills', ...LEGACY_TERRAIN_VARIANT },\n {\n bedrockId: 'minecraft:ice_caves',\n javaSince: '26.4-snapshot-10',\n reason:\n 'Listed from Bedrock 1.26.60 with id 196, and absent from Java 26.3. The pinned Bedrock ' +\n 'Dedicated Server sends no definition for it and ships no biome file for it, so no ' +\n 'vanilla world generates it yet.',\n reference: 'bedrock-samples v1.26.60.5 metadata/vanilladata_modules/mojang-biomes.json'\n },\n { bedrockId: 'minecraft:ice_mountains', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:jungle_edge_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:jungle_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:jungle_mutated', ...LEGACY_MUTATED_VARIANT },\n {\n bedrockId: 'minecraft:legacy_frozen_ocean',\n reason:\n \"Bedrock's own pre-1.13 frozen ocean, kept so a world generated before the Update \" +\n 'Aquatic ocean split still reads back. Java never had a second frozen ocean.',\n reference: `${NOTE} section 6`\n },\n { bedrockId: 'minecraft:mega_taiga_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:mesa_plateau', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:mesa_plateau_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:mesa_plateau_stone_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:mushroom_island_shore', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:redwood_taiga_hills_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:roofed_forest_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:savanna_plateau_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:swampland_mutated', ...LEGACY_MUTATED_VARIANT },\n { bedrockId: 'minecraft:taiga_hills', ...LEGACY_TERRAIN_VARIANT },\n { bedrockId: 'minecraft:taiga_mutated', ...LEGACY_MUTATED_VARIANT }\n] as const satisfies readonly BedrockBiomeLoss[];\n\n/**\n * A whole Java registry whose entries reach the Bedrock client but which\n * this package has no table for.\n *\n * The row is registry-wide rather than one row per entry because the gap is\n * the same for every entry: the value travels in Bedrock, and nothing here\n * decides what it travels as. The identifier still has to be an entry of the\n * pinned Java 26.3 registry, so a typo fails the load. `entries.count` is a\n * review baseline reported by the parity dashboard, not a gate on registry size.\n */\nexport interface UntranslatedRegistry {\n /** The registry as a datapack reference names it. */\n readonly registry: string;\n /** How many entries the pinned Java 26.3 data publishes for it. */\n readonly entries: { readonly count: number };\n /** What carries the value on the Bedrock side, which is what a later table has to produce. */\n readonly carrier: string;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * The three registries whose entries this package cannot name in Bedrock\n * yet.\n *\n * All three are pinned-source problems rather than design problems: Bedrock\n * holds each of these as a number or a short code decided in client code,\n * and neither GeyserMC/mappings nor the bedrock-samples metadata publishes\n * the correspondence, so there is nothing to generate a table from. Mapping\n * them means capturing the Bedrock side first, which is Phase 2 and Phase 3\n * work.\n */\nexport const UNTRANSLATED_REGISTRIES = [\n {\n registry: 'banner_pattern',\n entries: { count: 43 },\n carrier: \"the banner's block entity NBT, which lists patterns by a short code such as `bs` or `cr`\",\n reason: 'Bedrock names banner patterns by two-letter code rather than by identifier, and no pinned source publishes the pairing; Geyser keeps it in client code.',\n reference: `${NOTE} section 5`\n },\n {\n registry: 'instrument',\n entries: { count: 8 },\n carrier: \"the goat horn item's data value, 0 to 7\",\n reason: 'Bedrock selects a goat horn sound by the item data value, in the order the eight horns were added; the identifiers exist only on the Java side.',\n reference: `${NOTE} section 5`\n },\n {\n registry: 'painting_variant',\n entries: { count: 51 },\n carrier: \"the painting entity's `Motive` string, which is a resource pack name rather than a registry id\",\n reason: 'Bedrock paintings are named by the resource pack texture they draw, so the set a client knows is whatever its pack ships; the pinned metadata lists no painting registry.',\n reference: `${NOTE} section 5`\n }\n] as const satisfies readonly UntranslatedRegistry[];\n\n/** What a Java block entity's field runs into on the Bedrock side. */\nexport type BlockEntityContentLossKind =\n /** Bedrock has no tag for it, and nothing else on the block entity carries it. */\n | 'unrepresentable'\n /** Bedrock keeps a coarser form of the same fact, named in the reason. */\n | 'coarsened'\n /** Bedrock has the tag but only in a shape this server cannot resolve the Java value into. */\n | 'unresolvable';\n\n/** A field of a Java block entity that does not reach the Bedrock block entity. */\nexport interface BlockEntityContentLoss {\n /** The Java block entity type, for example `minecraft:sign`. */\n readonly javaType: string;\n /** The Java NBT field that is dropped, as the saved compound spells it. */\n readonly field: string;\n readonly kind: BlockEntityContentLossKind;\n readonly reason: string;\n readonly reference: string;\n}\n\n/**\n * The fields a Java block entity's contents lose on the way to a Bedrock one.\n *\n * `blockentity/javaBlockEntityContent.ts` in `@jsprismarine/prismarine` translates the rest:\n * a banner's color and patterns, a sign's two faces, a decorated pot's four sherds, a vault's\n * key, a spawner's mob and every container's stacks. These five are what it knowingly drops,\n * and each is dropped because Bedrock has nowhere to put it rather than because nobody wrote\n * the code.\n *\n * The counts in the reasons were measured over the 1511 Java 26.3 structure templates, which\n * declare 1124 block entities once the jigsaws and structure blocks that are consumed during\n * placement are set aside.\n */\nexport const BLOCK_ENTITY_CONTENT_LOSSES = [\n {\n javaType: 'minecraft:sign',\n field: 'allow_op_features',\n kind: 'unrepresentable',\n reason: 'A Java sign may be allowed to run the click events an operator wrote into its text. Bedrock signs run nothing, so there is no flag to carry. All five signs in the structure templates set it.',\n reference: `${NOTE} section 7`\n },\n {\n javaType: 'minecraft:sign',\n field: 'filtered_messages',\n kind: 'unrepresentable',\n reason: \"Java keeps a second, profanity-filtered copy of a sign's four lines for Realms. A Bedrock sign face holds one string, so only the unfiltered copy travels. One template sign carries the second copy.\",\n reference: `${NOTE} section 7`\n },\n {\n javaType: 'minecraft:furnace',\n field: 'RecipesUsed',\n kind: 'coarsened',\n reason: 'Java tallies how many of each recipe a furnace smelted, to hand back the right experience. Bedrock keeps one number, `StoredXPInt`, and no recipe names. The 48 furnaces, blast furnaces and smokers in the templates carry the tally; one of them has anything in it.',\n reference: `${NOTE} section 7`\n },\n {\n javaType: 'minecraft:trial_spawner',\n field: 'normal_config',\n kind: 'unresolvable',\n reason: \"Java may write a trial spawner's two configurations as a reference into its `trial_spawner` registry, and all 14 in the templates do. Bedrock has no reference form and takes the configuration inline, so resolving one means reading the Java registry, which this server does not load. A configuration written inline translates.\",\n reference: `${NOTE} section 7`\n },\n {\n javaType: 'minecraft:banner',\n field: 'patterns',\n kind: 'unrepresentable',\n reason: 'Bedrock draws banner patterns from its own client assets and names them by a short code, so a pattern a datapack shipped has no code to be named by and the layer is dropped. Every pattern Java 26.3 publishes has one; no template uses a pattern that does not.',\n reference: `${NOTE} section 5`\n },\n {\n javaType: 'minecraft:brewing_stand',\n field: 'Items[].components.minecraft:potion_contents',\n kind: 'coarsened',\n reason: \"Bedrock tells its potions apart by the stack's data value rather than by name, and no pinned source publishes which number is which potion, so a stack of a named potion arrives as the plain bottle. Three stacks in the templates are potions: two of strong healing in an end city, one splash potion of weakness in an igloo.\",\n reference: `${NOTE} section 3`\n }\n] as const satisfies readonly BlockEntityContentLoss[];\n"],"mappings":";;;;;;;;;;;;AAYA,IAAM,OAAO;;;;;;AAiCb,IAAa,2BAA2B;CACpC;EACI,UAAU;EACV,QAAQ,EAAE,OAAO,IAAI;EACrB,UAAU;EACV,QAAQ;EACR,WAAW,GAAG,KAAK;CACvB;CACA;EACI,UAAU;EACV,QAAQ,EAAE,OAAO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AU;EACV,OAAO;EACP,MAAM;EACN,QAAQ;EACR,WAAW,GAAG,KAAK;CACvB;CACA;EACI,UAAU;EACV,OAAO;EACP,MAAM;EACN,QAAQ;EACR,WAAW,GAAG,KAAK;CACvB;AACJ"}
@@ -77,7 +77,7 @@ export type BedrockBiomeResult =
77
77
  * each returns `mapped` or a reviewed `loss`, never `undefined`. Where several Java biomes
78
78
  * share one Bedrock biome - the River takes `the_void` as well, and the End takes all five of
79
79
  * Java's End biomes - the result names the Java biome the Bedrock one is the counterpart of,
80
- * which is the one {@link import('./lossList').REGISTRY_LOSSES} does not list.
80
+ * which is the one {@link REGISTRY_LOSSES} does not list.
81
81
  *
82
82
  * There is no `passthrough` variant, because a custom biome has no vanilla id to be stored
83
83
  * as; an identifier the pinned data does not have is `unknown` whichever namespace it is in.
@@ -47,7 +47,7 @@ var bedrockBiomeLossById = new Map(BEDROCK_BIOME_LOSSES.map((loss) => [loss.bedr
47
47
  * each returns `mapped` or a reviewed `loss`, never `undefined`. Where several Java biomes
48
48
  * share one Bedrock biome - the River takes `the_void` as well, and the End takes all five of
49
49
  * Java's End biomes - the result names the Java biome the Bedrock one is the counterpart of,
50
- * which is the one {@link import('./lossList').REGISTRY_LOSSES} does not list.
50
+ * which is the one {@link REGISTRY_LOSSES} does not list.
51
51
  *
52
52
  * There is no `passthrough` variant, because a custom biome has no vanilla id to be stored
53
53
  * as; an identifier the pinned data does not have is `unknown` whichever namespace it is in.
@@ -1 +1 @@
1
- {"version":3,"file":"registryMapping.js","names":[],"sources":["../src/registryMapping.ts"],"sourcesContent":["import type { BedrockBiomeLoss, RegistryLoss } from './lossList';\nimport { BEDROCK_BIOME_LOSSES, REGISTRY_LOSSES } from './lossList';\nimport { registriesTable } from './tables';\nimport { MappingErrors } from '@jsprismarine/errors/mapping';\n\n/** The registries beyond blocks, items and entities that this package maps. */\nexport const MAPPED_REGISTRIES = ['biome', 'enchantment', 'mob_effect', 'potion'] as const;\n/** One of {@link MAPPED_REGISTRIES}. */\nexport type MappedRegistry = (typeof MAPPED_REGISTRIES)[number];\n\n/** What a Java registry identifier lookup produced. */\nexport type IdentifierMappingResult =\n /** A Bedrock identifier the pinned data set knows. */\n | { readonly kind: 'mapped'; readonly bedrock: string }\n /**\n * A reviewed loss. Merged biomes carry the shared Bedrock biome in\n * `loss.bedrockFallback`; `sweeping_edge`, the four effects and the luck\n * potion carry no fallback, because Bedrock has no id for them at all.\n */\n | { readonly kind: 'loss'; readonly loss: RegistryLoss }\n /** A non-`minecraft:` identifier, passed through untouched for custom content. */\n | { readonly kind: 'passthrough'; readonly bedrock: string }\n /** Not a Java 26.3 entry of the registry. */\n | { readonly kind: 'unknown'; readonly registry: MappedRegistry; readonly javaId: string };\n\nconst registryLossById = new Map<string, RegistryLoss>(\n REGISTRY_LOSSES.map((loss) => [`${loss.registry} ${loss.javaId}`, loss])\n);\n\n/**\n * Maps one Java 26.3 identifier of the named registry to its identifier in the\n * pinned Bedrock release. Total over the registry's vanilla entries: every entry returns\n * `mapped` or a reviewed `loss`, never `undefined`. Non-`minecraft:`\n * identifiers pass through untouched.\n */\nexport const javaIdentifierToBedrock = (registry: MappedRegistry, javaId: string): IdentifierMappingResult => {\n if (!javaId.startsWith('minecraft:')) return { kind: 'passthrough', bedrock: javaId };\n const loss = registryLossById.get(`${registry} ${javaId}`);\n if (loss !== undefined) return { kind: 'loss', loss };\n const bedrock = registriesTable[registry][javaId];\n if (bedrock === undefined) return { kind: 'unknown', registry, javaId };\n return { kind: 'mapped', bedrock };\n};\n\n/** One Bedrock biome: what a chunk stores it as, and what the client calls it. */\nexport interface BedrockBiome {\n /**\n * The number a chunk stores and the client resolves grass color, fog and ambient sound\n * from. Mojang's own, not a registry position, so it cannot be derived from the name.\n */\n readonly id: number;\n /** The namespaced Bedrock biome identifier, such as `minecraft:mesa`. */\n readonly identifier: string;\n}\n\n/** What a Bedrock biome lookup produced. */\nexport type BedrockBiomeResult =\n /** A Bedrock biome with a Java 26.3 biome behind it. */\n | { readonly kind: 'mapped'; readonly bedrock: BedrockBiome; readonly java: string }\n /**\n * A reviewed loss: one of the 27 legacy Bedrock biomes Java 26.3 has no identifier for.\n * The Bedrock side is still known, so a caller that only wanted the identifier has it.\n */\n | { readonly kind: 'loss'; readonly bedrock: BedrockBiome; readonly loss: BedrockBiomeLoss }\n /** Neither a pinned Bedrock biome id nor a pinned Bedrock biome identifier. */\n | { readonly kind: 'unknown'; readonly biome: number | string };\n\nconst bedrockBiomeById = new Map(\n Object.entries(registriesTable.bedrockBiomes).map(([identifier, entry]) => [entry.id, identifier])\n);\n\nconst bedrockBiomeLossById = new Map<string, BedrockBiomeLoss>(\n BEDROCK_BIOME_LOSSES.map((loss) => [loss.bedrockId, loss])\n);\n\n/**\n * The inverse of the biome half of {@link javaIdentifierToBedrock}: resolves what a chunk\n * stores back to the Bedrock biome, and to the Java 26.3 biome that produced it.\n *\n * Total over the pinned Bedrock biomes, which is every biome the generated world can hold:\n * each returns `mapped` or a reviewed `loss`, never `undefined`. Where several Java biomes\n * share one Bedrock biome - the River takes `the_void` as well, and the End takes all five of\n * Java's End biomes - the result names the Java biome the Bedrock one is the counterpart of,\n * which is the one {@link import('./lossList').REGISTRY_LOSSES} does not list.\n *\n * There is no `passthrough` variant, because a custom biome has no vanilla id to be stored\n * as; an identifier the pinned data does not have is `unknown` whichever namespace it is in.\n *\n * @param {number | string} biome - The numeric id a chunk stores, or the Bedrock identifier.\n * @returns {BedrockBiomeResult} The Bedrock biome and its Java source, a reviewed loss, or `unknown`.\n * @example\n * ```typescript\n * bedrockBiomeToJava(37); // { kind: 'mapped', bedrock: { id: 37, identifier: 'minecraft:mesa' }, java: 'minecraft:badlands' }\n * bedrockBiomeToJava('minecraft:taiga_hills'); // { kind: 'loss', bedrock: { id: 19, ... }, loss: { reason: ... } }\n * ```\n */\nexport const bedrockBiomeToJava = (biome: number | string): BedrockBiomeResult => {\n const identifier = typeof biome === 'number' ? bedrockBiomeById.get(biome) : biome;\n const entry = identifier === undefined ? undefined : registriesTable.bedrockBiomes[identifier];\n if (identifier === undefined || entry === undefined) return { kind: 'unknown', biome };\n\n const bedrock: BedrockBiome = { id: entry.id, identifier };\n if (entry.java !== undefined) return { kind: 'mapped', bedrock, java: entry.java };\n\n const loss = bedrockBiomeLossById.get(identifier);\n // The generator refuses to emit a Bedrock biome that has neither a Java source nor a\n // reviewed loss, so this is unreachable with the committed table.\n if (loss === undefined) throw new MappingErrors.UnmappedBiome({ identifier });\n return { kind: 'loss', bedrock, loss };\n};\n"],"mappings":";;;;;AAMA,IAAa,oBAAoB;CAAC;CAAS;CAAe;CAAc;AAAQ;AAmBhF,IAAM,mBAAmB,IAAI,IACzB,gBAAgB,KAAK,SAAS,CAAC,GAAG,KAAK,SAAS,GAAG,KAAK,UAAU,IAAI,CAAC,CAC3E;;;;;;;AAQA,IAAa,2BAA2B,UAA0B,WAA4C;CAC1G,IAAI,CAAC,OAAO,WAAW,YAAY,GAAG,OAAO;EAAE,MAAM;EAAe,SAAS;CAAO;CACpF,MAAM,OAAO,iBAAiB,IAAI,GAAG,SAAS,GAAG,QAAQ;CACzD,IAAI,SAAS,KAAA,GAAW,OAAO;EAAE,MAAM;EAAQ;CAAK;CACpD,MAAM,UAAU,gBAAgB,SAAS,CAAC;CAC1C,IAAI,YAAY,KAAA,GAAW,OAAO;EAAE,MAAM;EAAW;EAAU;CAAO;CACtE,OAAO;EAAE,MAAM;EAAU;CAAQ;AACrC;AAyBA,IAAM,mBAAmB,IAAI,IACzB,OAAO,QAAQ,gBAAgB,aAAa,CAAC,CAAC,KAAK,CAAC,YAAY,WAAW,CAAC,MAAM,IAAI,UAAU,CAAC,CACrG;AAEA,IAAM,uBAAuB,IAAI,IAC7B,qBAAqB,KAAK,SAAS,CAAC,KAAK,WAAW,IAAI,CAAC,CAC7D;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAa,sBAAsB,UAA+C;CAC9E,MAAM,aAAa,OAAO,UAAU,WAAW,iBAAiB,IAAI,KAAK,IAAI;CAC7E,MAAM,QAAQ,eAAe,KAAA,IAAY,KAAA,IAAY,gBAAgB,cAAc;CACnF,IAAI,eAAe,KAAA,KAAa,UAAU,KAAA,GAAW,OAAO;EAAE,MAAM;EAAW;CAAM;CAErF,MAAM,UAAwB;EAAE,IAAI,MAAM;EAAI;CAAW;CACzD,IAAI,MAAM,SAAS,KAAA,GAAW,OAAO;EAAE,MAAM;EAAU;EAAS,MAAM,MAAM;CAAK;CAEjF,MAAM,OAAO,qBAAqB,IAAI,UAAU;CAGhD,IAAI,SAAS,KAAA,GAAW,MAAM,IAAI,cAAc,cAAc,EAAE,WAAW,CAAC;CAC5E,OAAO;EAAE,MAAM;EAAQ;EAAS;CAAK;AACzC"}
1
+ {"version":3,"file":"registryMapping.js","names":[],"sources":["../src/registryMapping.ts"],"sourcesContent":["import type { BedrockBiomeLoss, RegistryLoss } from './lossList';\nimport { BEDROCK_BIOME_LOSSES, REGISTRY_LOSSES } from './lossList';\nimport { registriesTable } from './tables';\nimport { MappingErrors } from '@jsprismarine/errors/mapping';\n\n/** The registries beyond blocks, items and entities that this package maps. */\nexport const MAPPED_REGISTRIES = ['biome', 'enchantment', 'mob_effect', 'potion'] as const;\n/** One of {@link MAPPED_REGISTRIES}. */\nexport type MappedRegistry = (typeof MAPPED_REGISTRIES)[number];\n\n/** What a Java registry identifier lookup produced. */\nexport type IdentifierMappingResult =\n /** A Bedrock identifier the pinned data set knows. */\n | { readonly kind: 'mapped'; readonly bedrock: string }\n /**\n * A reviewed loss. Merged biomes carry the shared Bedrock biome in\n * `loss.bedrockFallback`; `sweeping_edge`, the four effects and the luck\n * potion carry no fallback, because Bedrock has no id for them at all.\n */\n | { readonly kind: 'loss'; readonly loss: RegistryLoss }\n /** A non-`minecraft:` identifier, passed through untouched for custom content. */\n | { readonly kind: 'passthrough'; readonly bedrock: string }\n /** Not a Java 26.3 entry of the registry. */\n | { readonly kind: 'unknown'; readonly registry: MappedRegistry; readonly javaId: string };\n\nconst registryLossById = new Map<string, RegistryLoss>(\n REGISTRY_LOSSES.map((loss) => [`${loss.registry} ${loss.javaId}`, loss])\n);\n\n/**\n * Maps one Java 26.3 identifier of the named registry to its identifier in the\n * pinned Bedrock release. Total over the registry's vanilla entries: every entry returns\n * `mapped` or a reviewed `loss`, never `undefined`. Non-`minecraft:`\n * identifiers pass through untouched.\n */\nexport const javaIdentifierToBedrock = (registry: MappedRegistry, javaId: string): IdentifierMappingResult => {\n if (!javaId.startsWith('minecraft:')) return { kind: 'passthrough', bedrock: javaId };\n const loss = registryLossById.get(`${registry} ${javaId}`);\n if (loss !== undefined) return { kind: 'loss', loss };\n const bedrock = registriesTable[registry][javaId];\n if (bedrock === undefined) return { kind: 'unknown', registry, javaId };\n return { kind: 'mapped', bedrock };\n};\n\n/** One Bedrock biome: what a chunk stores it as, and what the client calls it. */\nexport interface BedrockBiome {\n /**\n * The number a chunk stores and the client resolves grass color, fog and ambient sound\n * from. Mojang's own, not a registry position, so it cannot be derived from the name.\n */\n readonly id: number;\n /** The namespaced Bedrock biome identifier, such as `minecraft:mesa`. */\n readonly identifier: string;\n}\n\n/** What a Bedrock biome lookup produced. */\nexport type BedrockBiomeResult =\n /** A Bedrock biome with a Java 26.3 biome behind it. */\n | { readonly kind: 'mapped'; readonly bedrock: BedrockBiome; readonly java: string }\n /**\n * A reviewed loss: one of the 27 legacy Bedrock biomes Java 26.3 has no identifier for.\n * The Bedrock side is still known, so a caller that only wanted the identifier has it.\n */\n | { readonly kind: 'loss'; readonly bedrock: BedrockBiome; readonly loss: BedrockBiomeLoss }\n /** Neither a pinned Bedrock biome id nor a pinned Bedrock biome identifier. */\n | { readonly kind: 'unknown'; readonly biome: number | string };\n\nconst bedrockBiomeById = new Map(\n Object.entries(registriesTable.bedrockBiomes).map(([identifier, entry]) => [entry.id, identifier])\n);\n\nconst bedrockBiomeLossById = new Map<string, BedrockBiomeLoss>(\n BEDROCK_BIOME_LOSSES.map((loss) => [loss.bedrockId, loss])\n);\n\n/**\n * The inverse of the biome half of {@link javaIdentifierToBedrock}: resolves what a chunk\n * stores back to the Bedrock biome, and to the Java 26.3 biome that produced it.\n *\n * Total over the pinned Bedrock biomes, which is every biome the generated world can hold:\n * each returns `mapped` or a reviewed `loss`, never `undefined`. Where several Java biomes\n * share one Bedrock biome - the River takes `the_void` as well, and the End takes all five of\n * Java's End biomes - the result names the Java biome the Bedrock one is the counterpart of,\n * which is the one {@link REGISTRY_LOSSES} does not list.\n *\n * There is no `passthrough` variant, because a custom biome has no vanilla id to be stored\n * as; an identifier the pinned data does not have is `unknown` whichever namespace it is in.\n *\n * @param {number | string} biome - The numeric id a chunk stores, or the Bedrock identifier.\n * @returns {BedrockBiomeResult} The Bedrock biome and its Java source, a reviewed loss, or `unknown`.\n * @example\n * ```typescript\n * bedrockBiomeToJava(37); // { kind: 'mapped', bedrock: { id: 37, identifier: 'minecraft:mesa' }, java: 'minecraft:badlands' }\n * bedrockBiomeToJava('minecraft:taiga_hills'); // { kind: 'loss', bedrock: { id: 19, ... }, loss: { reason: ... } }\n * ```\n */\nexport const bedrockBiomeToJava = (biome: number | string): BedrockBiomeResult => {\n const identifier = typeof biome === 'number' ? bedrockBiomeById.get(biome) : biome;\n const entry = identifier === undefined ? undefined : registriesTable.bedrockBiomes[identifier];\n if (identifier === undefined || entry === undefined) return { kind: 'unknown', biome };\n\n const bedrock: BedrockBiome = { id: entry.id, identifier };\n if (entry.java !== undefined) return { kind: 'mapped', bedrock, java: entry.java };\n\n const loss = bedrockBiomeLossById.get(identifier);\n // The generator refuses to emit a Bedrock biome that has neither a Java source nor a\n // reviewed loss, so this is unreachable with the committed table.\n if (loss === undefined) throw new MappingErrors.UnmappedBiome({ identifier });\n return { kind: 'loss', bedrock, loss };\n};\n"],"mappings":";;;;;AAMA,IAAa,oBAAoB;CAAC;CAAS;CAAe;CAAc;AAAQ;AAmBhF,IAAM,mBAAmB,IAAI,IACzB,gBAAgB,KAAK,SAAS,CAAC,GAAG,KAAK,SAAS,GAAG,KAAK,UAAU,I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{
2
2
  "name": "@jsprismarine/mapping",
3
- "version": "0.23.0-unstable-20261121073620",
3
+ "version": "0.23.0",
4
4
  "description": "The Java Edition to Bedrock Edition identifier seam: generated mapping tables and a reviewed loss list",
5
5
  "sideEffects": false,
6
6
  "publishConfig": {
@@ -52,12 +52,12 @@
52
52
  "license": "(MIT OR MPL-2.0)",
53
53
  "homepage": "https://github.com/JSPrismarine/JSPrismarine/tree/master/packages/mapping",
54
54
  "dependencies": {
55
- "@jsprismarine/errors": "0.23.0-unstable-20261121073620",
56
- "@jsprismarine/minecraft": "0.23.0-unstable-20261121073620"
55
+ "@jsprismarine/errors": "0.23.0",
56
+ "@jsprismarine/minecraft": "0.23.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@jsprismarine/bedrock-data": "0.23.0-unstable-20261121073620",
60
- "@jsprismarine/packs": "0.23.0-unstable-20261121073620",
59
+ "@jsprismarine/bedrock-data": "0.23.0",
60
+ "@jsprismarine/packs": "0.23.0",
61
61
  "@types/node": "26.6.6",
62
62
  "glob": "14.0.6",
63
63
  "rimraf": "6.1.4",