-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support 1.18.2, 1.19.4, 1.20.6, 1.21.1 (#81)
* Support 1.18.2 * Support 1.19, 1.20, 1.21 * remove commented code * add back full check * remove full check
- Loading branch information
Showing
12 changed files
with
43 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,4 @@ dist/ | |
distTest/ | ||
world/testRegion/* | ||
package-lock.json | ||
test/fixtures/* | ||
test/world/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const assert = require('assert') | ||
const { Vec3 } = require('vec3') | ||
|
||
function compareChunks (chunk, chunk2, chunkOptions) { | ||
const p = new Vec3(0, chunkOptions.minY, 0) | ||
const maxHeight = chunkOptions.worldHeight + chunkOptions.minY | ||
for (p.y = chunkOptions.minY; p.y < maxHeight; p.y++) { | ||
for (p.z = 0; p.z < 16; p.z++) { | ||
for (p.x = 0; p.x < 16; p.x++) { | ||
const b = chunk.getBlock(p) | ||
const b2 = chunk2.getBlock(p) | ||
assert.notStrictEqual( | ||
b.name, | ||
'', | ||
' block state: ' + | ||
b.stateId + | ||
' type: ' + | ||
b.type + | ||
" read, which doesn't exist" | ||
) | ||
assert.strictEqual(JSON.stringify(b), JSON.stringify(b2), 'blocks at ' + p + | ||
' differ, first block is ' + JSON.stringify(b, null, 2) + | ||
' second block is ' + JSON.stringify(b2, null, 2)) | ||
} | ||
} | ||
} | ||
} | ||
|
||
module.exports.compareChunks = compareChunks |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters