RuntimeBlockMapping::toRuntimeId() now accepts a single integer instead of id/meta

the expectation is that eventually this will receive arbitrary internal runtime IDs instead of static id/meta, and RuntimeBlockMapping doesn't really care about this crap anyway.
This commit is contained in:
Dylan K. Taylor
2020-09-20 12:16:11 +01:00
parent 42b184c113
commit 5661d0496f
11 changed files with 15 additions and 21 deletions

View File

@ -71,7 +71,7 @@ final class ChunkSerializer{
//zigzag and just shift directly.
$stream->putUnsignedVarInt(count($palette) << 1); //yes, this is intentionally zigzag
foreach($palette as $p){
$stream->put(Binary::writeUnsignedVarInt($blockMapper->toRuntimeId($p >> 4, $p & 0xf) << 1));
$stream->put(Binary::writeUnsignedVarInt($blockMapper->toRuntimeId($p) << 1));
}
}
}