Skip to content

Commit 844445b

Browse files
authored
Handle optional palette in 1.14 chunk.js (#74)
1 parent 29d67f9 commit 844445b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/1.14/chunk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ module.exports = (mcVersion, worldVersion, noSpan) => {
181181
type: 'byte',
182182
value: sectionY
183183
},
184-
Palette: writePalette(section.palette),
185184
BlockStates: writeBlocks(section.data)
186185
}
186+
if (section.palette !== null) nbtSection.Palette = writePalette(section.palette)
187187
if (blockLight !== null) nbtSection.BlockLight = writeByteArray(blockLight)
188188
if (skyLight !== null) nbtSection.SkyLight = writeByteArray(skyLight)
189189
return nbtSection

0 commit comments

Comments
 (0)