Skip to content

Commit

Permalink
fix: use dimension data on 1.16.2 (#3397)
Browse files Browse the repository at this point in the history
* fix: use dimension data on 1.16.2

* retrigger ci
  • Loading branch information
zardoy authored Dec 23, 2024
1 parent 71a3a26 commit f6187f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/plugins/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f6187f6

Please sign in to comment.