From 78f5204d33c4960fe411a95a1ba33eb3e7ef5e2f Mon Sep 17 00:00:00 2001 From: Quentin Bazin Date: Fri, 24 Jul 2020 23:02:30 +0200 Subject: [PATCH] [LuaBlockLoader] Fixed blockparam bit allocation for block states. --- mods/default/blocks.lua | 4 ++-- mods/default/blocks/door.lua | 4 ++-- source/server/lua/loader/LuaBlockLoader.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/default/blocks.lua b/mods/default/blocks.lua index 0a055ec4..383775cb 100644 --- a/mods/default/blocks.lua +++ b/mods/default/blocks.lua @@ -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, diff --git a/mods/default/blocks/door.lua b/mods/default/blocks/door.lua index 8dbb3225..17b47e8b 100644 --- a/mods/default/blocks/door.lua +++ b/mods/default/blocks/door.lua @@ -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", diff --git a/source/server/lua/loader/LuaBlockLoader.cpp b/source/server/lua/loader/LuaBlockLoader.cpp index a4bcf172..0bde0db6 100644 --- a/source/server/lua/loader/LuaBlockLoader.cpp +++ b/source/server/lua/loader/LuaBlockLoader.cpp @@ -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;