forked from minetest-mods/mesecons
Remove tiny (+0.001) selection box oversize
This commit is contained in:
parent
9e6eac4285
commit
a4f5ae5b89
@ -2,13 +2,14 @@ local screwdriver_exists = minetest.global_exists("screwdriver")
|
|||||||
|
|
||||||
local corner_nodebox = {
|
local corner_nodebox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
-- ±0.001 is to prevent z-fighting
|
||||||
fixed = {{ -16/32-0.001, -17/32, -3/32, 0, -13/32, 3/32 },
|
fixed = {{ -16/32-0.001, -17/32, -3/32, 0, -13/32, 3/32 },
|
||||||
{ -3/32, -17/32, -16/32+0.001, 3/32, -13/32, 3/32}}
|
{ -3/32, -17/32, -16/32+0.001, 3/32, -13/32, 3/32}}
|
||||||
}
|
}
|
||||||
|
|
||||||
local corner_selectionbox = {
|
local corner_selectionbox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -16/32-0.001, -16/32, -16/32, 5/32, -12/32, 5/32 },
|
fixed = { -16/32, -16/32, -16/32, 5/32, -12/32, 5/32 },
|
||||||
}
|
}
|
||||||
|
|
||||||
local corner_get_rules = function (node)
|
local corner_get_rules = function (node)
|
||||||
|
@ -32,7 +32,7 @@ minetest.register_node("mesecons_extrawires:crossover_off", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
stack_max = 99,
|
stack_max = 99,
|
||||||
selection_box = {type="fixed", fixed={-16/32-0.0001, -16/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}},
|
selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}},
|
||||||
groups = {dig_immediate=3, mesecon=3},
|
groups = {dig_immediate=3, mesecon=3},
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
mesecons = {
|
mesecons = {
|
||||||
@ -59,7 +59,7 @@ minetest.register_node("mesecons_extrawires:crossover_01", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
stack_max = 99,
|
stack_max = 99,
|
||||||
selection_box = {type="fixed", fixed={-16/32-0.0001, -16/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}},
|
selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}},
|
||||||
groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
|
groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
mesecons = {
|
mesecons = {
|
||||||
@ -86,7 +86,7 @@ minetest.register_node("mesecons_extrawires:crossover_10", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
stack_max = 99,
|
stack_max = 99,
|
||||||
selection_box = {type="fixed", fixed={-16/32-0.0001, -16/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}},
|
selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}},
|
||||||
groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
|
groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
mesecons = {
|
mesecons = {
|
||||||
@ -113,7 +113,7 @@ minetest.register_node("mesecons_extrawires:crossover_on", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
stack_max = 99,
|
stack_max = 99,
|
||||||
selection_box = {type="fixed", fixed={-16/32-0.0001, -16/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}},
|
selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}},
|
||||||
groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
|
groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
mesecons = {
|
mesecons = {
|
||||||
|
@ -2,13 +2,14 @@ local screwdriver_exists = minetest.global_exists("screwdriver")
|
|||||||
|
|
||||||
local tjunction_nodebox = {
|
local tjunction_nodebox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
-- ±0.001 is to prevent z-fighting
|
||||||
fixed = {{ -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 },
|
fixed = {{ -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 },
|
||||||
{ -3/32, -17/32, -16/32+0.001, 3/32, -13/32, -3/32},}
|
{ -3/32, -17/32, -16/32+0.001, 3/32, -13/32, -3/32},}
|
||||||
}
|
}
|
||||||
|
|
||||||
local tjunction_selectionbox = {
|
local tjunction_selectionbox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -16/32-0.001, -16/32, -16/32, 16/32+0.001, -12/32, 7/32 },
|
fixed = { -16/32, -16/32, -16/32, 16/32, -12/32, 7/32 },
|
||||||
}
|
}
|
||||||
|
|
||||||
local tjunction_get_rules = function (node)
|
local tjunction_get_rules = function (node)
|
||||||
|
@ -27,10 +27,11 @@ minetest.register_node("mesecons_insulated:insulated_on", {
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -16/32-0.001, -16/32, -7/32, 16/32+0.001, -12/32, 7/32 }
|
fixed = { -16/32, -16/32, -7/32, 16/32, -12/32, 7/32 }
|
||||||
},
|
},
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
-- ±0.001 is to prevent z-fighting
|
||||||
fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }
|
fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }
|
||||||
},
|
},
|
||||||
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
|
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
|
||||||
@ -63,10 +64,11 @@ minetest.register_node("mesecons_insulated:insulated_off", {
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -16/32-0.001, -16/32, -7/32, 16/32+0.001, -12/32, 7/32 }
|
fixed = { -16/32, -16/32, -7/32, 16/32, -12/32, 7/32 }
|
||||||
},
|
},
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
-- ±0.001 is to prevent z-fighting
|
||||||
fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }
|
fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }
|
||||||
},
|
},
|
||||||
groups = {dig_immediate = 3},
|
groups = {dig_immediate = 3},
|
||||||
|
Loading…
Reference in New Issue
Block a user