I'm noob at modding... I need some help.
I'm creating a mod and I have a problem here related with 2x1 blocks (horizontal 2 boxes size).
For some reason, the second box is empty, yep, it contains an "air" node type,
When I put another node one node back from the other, an overlapping problem occurs between both nodes. See attached images for more info.
How can I avoid this overlapping? Can you help me, please?
My code:
Spoiler
Code: Select all
local two_x_four_cbox = {
type = "fixed",
fixed = {-0.5, -0.5, 1.5, 0.5, 0.5, -0.5}
}
function make_node_def(name, model, tiles, selbox, colbox, not_in_creative_inventory)
not_in_creative_inventory = not_in_creative_inventory or 1
return {
description = name,
tiles = {
tiles
},
drawtype = "mesh",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
mesh = model,
visual_scale = 0.5,
wield_scale = {x = 0.5, y = 0.5, z = 0.5},
groups = { snappy = 3 },
selection_box = selbox,
node_box = selbox,
collision_box = colbox,
sounds = node_sound_zeca_bricks_defaults()
}
end
--register a brick-node for each texture on texture directory
for _, file_name in ipairs(files) do
color_name = string.gsub(file_name, ".png", "")
color_name_first_cap = firstToUpper(color_name)
minetest.register_node("zeca_bricks:2x4_".. color_name .. "_brick", make_node_def( color_name_first_cap .." Brick 2x4","2x4_brick.obj", file_name, two_x_four_cbox, two_x_four_cbox))
end