mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
fix and refactor ContentLUT
This commit is contained in:
parent
ee9f1639e9
commit
1acced4475
5 changed files with 99 additions and 107 deletions
|
|
@ -127,7 +127,7 @@ void Chunk::convert(ubyte* data, const ContentLUT* lut) {
|
|||
// see encode method to understand what the hell is going on here
|
||||
blockid_t id = ((static_cast<blockid_t>(data[i]) << 8) |
|
||||
static_cast<blockid_t>(data[CHUNK_VOL+i]));
|
||||
blockid_t replacement = lut->getBlockId(id);
|
||||
blockid_t replacement = lut->blocks.getId(id);
|
||||
data[i] = replacement >> 8;
|
||||
data[CHUNK_VOL+i] = replacement & 0xFF;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue