[LuaBlockLoader] Fixed blockparam bit allocation for block states.
This commit is contained in:
parent
e85c5f3458
commit
78f5204d33
@ -389,7 +389,7 @@ mod:block {
|
|||||||
|
|
||||||
mod:block {
|
mod:block {
|
||||||
id = "seeds",
|
id = "seeds",
|
||||||
name = "Seeds",
|
name = "Seeds (WIP)",
|
||||||
tiles = "wheat_stage_0.png",
|
tiles = "wheat_stage_0.png",
|
||||||
draw_type = "xshape",
|
draw_type = "xshape",
|
||||||
inventory_image = "seeds_wheat.png",
|
inventory_image = "seeds_wheat.png",
|
||||||
@ -435,7 +435,7 @@ mod:block {
|
|||||||
|
|
||||||
mod:block {
|
mod:block {
|
||||||
id = "torch",
|
id = "torch",
|
||||||
name = "Torch",
|
name = "Torch (WIP)",
|
||||||
tiles = "torch_on.png",
|
tiles = "torch_on.png",
|
||||||
is_light_source = true,
|
is_light_source = true,
|
||||||
is_collidable = false,
|
is_collidable = false,
|
||||||
|
@ -44,7 +44,7 @@ end
|
|||||||
|
|
||||||
mod:block {
|
mod:block {
|
||||||
id = "door_wood_upper",
|
id = "door_wood_upper",
|
||||||
name = "Wooden Door",
|
name = "Wooden Door (WIP)",
|
||||||
tiles = "door_wood_upper.png",
|
tiles = "door_wood_upper.png",
|
||||||
inventory_image = "door_wood.png",
|
inventory_image = "door_wood.png",
|
||||||
groups = {
|
groups = {
|
||||||
@ -77,7 +77,7 @@ mod:block {
|
|||||||
|
|
||||||
mod:block {
|
mod:block {
|
||||||
id = "door_wood_lower",
|
id = "door_wood_lower",
|
||||||
name = "Wooden Door",
|
name = "Wooden Door (WIP)",
|
||||||
tiles = "door_wood_lower.png",
|
tiles = "door_wood_lower.png",
|
||||||
inventory_image = "door_wood.png",
|
inventory_image = "door_wood.png",
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ inline void LuaBlockLoader::loadParams(ServerBlock &block) const {
|
|||||||
block.param().allocateBits(BlockParam::Type::Rotation, 5);
|
block.param().allocateBits(BlockParam::Type::Rotation, 5);
|
||||||
|
|
||||||
if (block.states().size() > 1) {
|
if (block.states().size() > 1) {
|
||||||
int bits = 0;
|
int bits = 1;
|
||||||
int index = block.states().size();
|
int index = block.states().size();
|
||||||
while (index >>= 1)
|
while (index >>= 1)
|
||||||
++bits;
|
++bits;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user