We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eed7ca5 commit f1c1f9aCopy full SHA for f1c1f9a
src/bedrock/1.18/SubChunk.js
@@ -3,6 +3,16 @@ const { StorageType } = require('../common/constants')
3
const PalettedStorage = require('../common/PalettedStorage')
4
5
class SubChunk118 extends SubChunk13 {
6
+ loadRuntimePalette (storageLayer, stream, paletteSize) {
7
+ this.palette[storageLayer] = []
8
+
9
+ for (let i = 0; i < paletteSize; i++) {
10
+ const runtimeId = stream.readZigZagVarInt()
11
+ const block = this.registry.blocksByRuntimeId[runtimeId]
12
+ this.palette[storageLayer][i] = { stateId: block.stateId, ...block, count: 0 }
13
+ }
14
15
16
loadPalettedBlocks (storageLayer, stream, bitsPerBlock, format) {
17
if ((format === StorageType.Runtime) && (bitsPerBlock === 0)) {
18
this.palette[storageLayer] = []
0 commit comments