We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 875c215 commit c0ebe7cCopy full SHA for c0ebe7c
src/legacy/api/BlockAPI.cpp
@@ -468,7 +468,9 @@ Local<Value> McClass::getBlock(const Arguments& args) {
468
if (!lc) {
469
return {};
470
}
471
- auto& block = lc->getBlock(ChunkBlockPos{(uchar)pos.x, (uchar)pos.z, minHeight});
+ auto& block = lc->getBlock(
472
+ ChunkBlockPos{(uchar)(pos.x & 0xf), (uchar)(pos.z & 0xf), ChunkLocalHeight{(short)pos.y - minHeight}}
473
+ );
474
return BlockClass::newBlock(block, pos.getBlockPos(), pos.dim);
475
476
CATCH("Fail in GetBlock!")
0 commit comments