@@ -6,17 +6,17 @@ const CommonChunkColumn = require('../common/CommonChunkColumn')
6
6
const constants = require ( '../common/constants' )
7
7
const neededBits = require ( '../common/neededBits' )
8
8
9
- const AQUATIC_UPDATE_MIN_Y = - 64
10
- const AQUATIC_UPDATE_WORLD_HEIGHT = 384
9
+ const CAVES_UPDATE_MIN_Y = - 64
10
+ const CAVES_UPDATE_WORLD_HEIGHT = 384
11
11
12
12
// wrap with func to provide version specific Block
13
13
module . exports = ( Block , mcData ) => {
14
14
return class ChunkColumn extends CommonChunkColumn {
15
15
static get section ( ) { return ChunkSection }
16
16
constructor ( options ) {
17
17
super ( mcData )
18
- this . minY = options ?. minY ?? AQUATIC_UPDATE_MIN_Y
19
- this . worldHeight = options ?. worldHeight ?? AQUATIC_UPDATE_WORLD_HEIGHT
18
+ this . minY = options ?. minY ?? CAVES_UPDATE_MIN_Y
19
+ this . worldHeight = options ?. worldHeight ?? CAVES_UPDATE_WORLD_HEIGHT
20
20
this . numSections = this . worldHeight >> 4
21
21
this . maxBitsPerBlock = neededBits ( Object . values ( mcData . blocks ) . reduce ( ( high , block ) => Math . max ( high , block . maxStateId ) , 0 ) )
22
22
this . maxBitsPerBiome = neededBits ( Object . values ( mcData . biomes ) . length )
@@ -287,8 +287,8 @@ module.exports = (Block, mcData) => {
287
287
288
288
_loadBlockLightNibbles ( y , buffer ) {
289
289
if ( buffer . length !== 2048 ) throw new Error ( 'Invalid light nibble buffer length ' + buffer . length )
290
- const minCY = Math . abs ( this . minY >> 4 )
291
- this . blockLightMask . set ( y + minCY , 1 ) // minCY + 1 extra layer below
290
+ const minCY = Math . abs ( this . minY >> 4 ) + 1 // minCY + 1 extra layer below
291
+ this . blockLightMask . set ( y + minCY , 1 )
292
292
this . blockLightSections [ y + minCY ] = new BitArray ( {
293
293
bitsPerValue : 4 ,
294
294
capacity : 4096 ,
@@ -298,8 +298,8 @@ module.exports = (Block, mcData) => {
298
298
299
299
_loadSkyLightNibbles ( y , buffer ) {
300
300
if ( buffer . length !== 2048 ) throw new Error ( 'Invalid light nibble buffer length: ' + buffer . length )
301
- const minCY = Math . abs ( this . minY >> 4 )
302
- this . skyLightMask . set ( y + minCY , 1 ) // minCY + 1 extra layer below
301
+ const minCY = Math . abs ( this . minY >> 4 ) + 1 // minCY + 1 extra layer below
302
+ this . skyLightMask . set ( y + minCY , 1 )
303
303
this . skyLightSections [ y + minCY ] = new BitArray ( {
304
304
bitsPerValue : 4 ,
305
305
capacity : 4096 ,
0 commit comments