minecraft-renderer 0.1.104 → 0.1.105

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minecraft-renderer",
3
- "version": "0.1.104",
3
+ "version": "0.1.105",
4
4
  "description": "The most Modular Minecraft world renderer with Three.js WebGL backend",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -80,7 +80,7 @@
80
80
  "lil-gui": "^0.18.2",
81
81
  "lodash": "^4.17.21",
82
82
  "mc-assets": "^0.2.72",
83
- "minecraft-data": "3.98.0",
83
+ "minecraft-data": "3.117.0",
84
84
  "mineflayer": "^4.33.0",
85
85
  "npm-run-all": "^4.1.5",
86
86
  "prettier": "^3.8.4",
@@ -1,10 +1,14 @@
1
1
  //@ts-nocheck
2
2
  import { test, expect } from 'vitest'
3
- import { versions } from 'minecraft-data'
3
+ import minecraftData, { versions } from 'minecraft-data'
4
4
  import { INVISIBLE_BLOCKS } from '../../mesher-shared/worldConstants'
5
5
  import { setup } from './mesherTester'
6
6
 
7
- const lastVersion = versions.pc.map(x => x.minecraftVersion).filter(version => !version.includes('w'))[0]
7
+ // newest release that minecraft-data has data for (its protocol versions list can run ahead of the data, e.g. 26.2 / 26.3)
8
+ const lastVersion = versions.pc
9
+ .map(x => x.minecraftVersion)
10
+ .filter(version => !/w|-pre|-rc|-snapshot/.test(version))
11
+ .find(version => minecraftData(version))!
8
12
 
9
13
  const addPositions = [
10
14
  // [[0, 0, 0], 'diamond_block'],
@@ -48,9 +52,28 @@ test('Known blocks are not rendered', () => {
48
52
  console.log('Average time', time / times)
49
53
  // should be fixed, but to avoid regressions & for visibility
50
54
  // TODO resolve creaking_heart issue (1.21.3)
55
+ // TODO 26.x: copper chests / copper golem statues (block entity models) and golden_dandelion have no block model yet
51
56
  expect(missingBlocks).toMatchInlineSnapshot(`
52
57
  {
58
+ "copper_chest": true,
59
+ "copper_golem_statue": true,
60
+ "exposed_copper_chest": true,
61
+ "exposed_copper_golem_statue": true,
62
+ "golden_dandelion": true,
63
+ "oxidized_copper_chest": true,
64
+ "oxidized_copper_golem_statue": true,
65
+ "potted_golden_dandelion": true,
53
66
  "structure_void": true,
67
+ "waxed_copper_chest": true,
68
+ "waxed_copper_golem_statue": true,
69
+ "waxed_exposed_copper_chest": true,
70
+ "waxed_exposed_copper_golem_statue": true,
71
+ "waxed_oxidized_copper_chest": true,
72
+ "waxed_oxidized_copper_golem_statue": true,
73
+ "waxed_weathered_copper_chest": true,
74
+ "waxed_weathered_copper_golem_statue": true,
75
+ "weathered_copper_chest": true,
76
+ "weathered_copper_golem_statue": true,
54
77
  }
55
78
  `)
56
79
  expect(erroredBlocks).toMatchInlineSnapshot('{}')
@@ -58,7 +58,7 @@ describe('mesher worker minecraft-data shim', () => {
58
58
  const { mcData } = supplyFor('1.21.8')
59
59
  const newest = mcData.protocolVersions[0]
60
60
  // a version from the future: only the main thread knows it
61
- const future = { ...mcData.version, minecraftVersion: '99.9', majorVersion: '99', dataVersion: newest.dataVersion + 1000, version: 9999 }
61
+ const future = { ...mcData.version, minecraftVersion: '99.9', majorVersion: '99', dataVersion: (newest.dataVersion ?? 0) + 1000, version: 9999 }
62
62
  ;(globalThis as any).mcData = {
63
63
  ...mcData,
64
64
  version: future,