[LuaBlockLoader] Fixed blockparam bit allocation for block states.

This commit is contained in:
Quentin Bazin 2020-07-24 23:02:30 +02:00
parent e85c5f3458
commit 78f5204d33
3 changed files with 5 additions and 5 deletions

View File

@ -389,7 +389,7 @@ mod:block {
mod:block {
id = "seeds",
name = "Seeds",
name = "Seeds (WIP)",
tiles = "wheat_stage_0.png",
draw_type = "xshape",
inventory_image = "seeds_wheat.png",
@ -435,7 +435,7 @@ mod:block {
mod:block {
id = "torch",
name = "Torch",
name = "Torch (WIP)",
tiles = "torch_on.png",
is_light_source = true,
is_collidable = false,

View File

@ -44,7 +44,7 @@ end
mod:block {
id = "door_wood_upper",
name = "Wooden Door",
name = "Wooden Door (WIP)",
tiles = "door_wood_upper.png",
inventory_image = "door_wood.png",
groups = {
@ -77,7 +77,7 @@ mod:block {
mod:block {
id = "door_wood_lower",
name = "Wooden Door",
name = "Wooden Door (WIP)",
tiles = "door_wood_lower.png",
inventory_image = "door_wood.png",

View File

@ -236,7 +236,7 @@ inline void LuaBlockLoader::loadParams(ServerBlock &block) const {
block.param().allocateBits(BlockParam::Type::Rotation, 5);
if (block.states().size() > 1) {
int bits = 0;
int bits = 1;
int index = block.states().size();
while (index >>= 1)
++bits;