Set full node collision box for bushy leaves
When a node has no collision box it uses the node box as the collision box. This effect made walking on nodes modified by this mod difficult. This patch explicitly sets a collision box with the size of a full node for modified nodes. This makes the “bushy leaves” effect purely visual; it does not affect collision differently than if the mod is not loaded.
This commit is contained in:
parent
3f89a5daa5
commit
e16e015cd8
6
init.lua
6
init.lua
|
@ -32,6 +32,11 @@ local node_box_bushy_leaves = {
|
|||
},
|
||||
}
|
||||
|
||||
local node_box_full_node = {
|
||||
type = "fixed",
|
||||
fixed = { -8/16, -8/16, -8/16, 8/16, 8/16, 8/16 },
|
||||
}
|
||||
|
||||
local get_node_box = function(node_name, node_def)
|
||||
local node_box
|
||||
if (
|
||||
|
@ -52,6 +57,7 @@ local add_bushy_leaves = function()
|
|||
{
|
||||
drawtype = "nodebox",
|
||||
node_box = node_box,
|
||||
collision_box = node_box_full_node,
|
||||
}
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue