From f6187f66c16dd122165287be7864c78b2fe7c32c Mon Sep 17 00:00:00 2001 From: Vitaly Date: Tue, 24 Dec 2024 01:51:58 +0300 Subject: [PATCH] fix: use dimension data on 1.16.2 (#3397) * fix: use dimension data on 1.16.2 * retrigger ci --- lib/plugins/blocks.js | 2 +- lib/plugins/game.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/blocks.js b/lib/plugins/blocks.js index 6a9c1655a..a2f41ad6f 100644 --- a/lib/plugins/blocks.js +++ b/lib/plugins/blocks.js @@ -261,7 +261,7 @@ function inject (bot, { version, storageBuilder, hideErrors }) { bot.world.setColumn(packet.chunkX, packet.chunkZ, column) } - if (bot.supportFeature('dimensionDataIsAvailable')) { + if (bot.supportFeature('newLightingDataFormat')) { column.loadParsedLight(packet.skyLight, packet.blockLight, packet.skyLightMask, packet.blockLightMask, packet.emptySkyLightMask, packet.emptyBlockLightMask) } else { column.loadLight(packet.data, packet.skyLightMask, packet.blockLightMask, packet.emptySkyLightMask, packet.emptyBlockLightMask) diff --git a/lib/plugins/game.js b/lib/plugins/game.js index c992d1f74..98649297a 100644 --- a/lib/plugins/game.js +++ b/lib/plugins/game.js @@ -60,7 +60,7 @@ function inject (bot, options) { bot.game.minY = dimData.minY bot.game.height = dimData.height } - } else if (bot.supportFeature('dimensionDataIsAvailable')) { // 1.18 + } else if (bot.supportFeature('dimensionDataIsAvailable')) { // 1.16.2+ const dimensionData = nbt.simplify(packet.dimension) bot.game.minY = dimensionData.min_y bot.game.height = dimensionData.height