forked from MineClone5/MineClone5
Merge remote-tracking branch 'origin/compatibility' into production-compatible
This commit is contained in:
commit
e8d26c9caf
|
@ -48,7 +48,7 @@ minetest.register_abm({
|
|||
local check_node_name = check_node.name
|
||||
if check_node_name ~= "air" and minetest.get_item_group(check_node_name, "water") == 0 then return end
|
||||
local param2 = minetest.dir_to_wallmounted(vector.subtract(pos, check_pos))
|
||||
local new_node = {name = "mcl_amethyst:medium_amethyst_bud", param2 = param2}
|
||||
local new_node = {name = "mcl_amethyst:small_amethyst_bud", param2 = param2}
|
||||
minetest.swap_node(check_pos, new_node)
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -3,6 +3,11 @@ local modname = minetest.get_current_modname()
|
|||
local modpath = minetest.get_modpath(modname)
|
||||
mcl_amethyst = {}
|
||||
|
||||
local sounds = mcl_sounds.node_sound_glass_defaults({
|
||||
footstep = {name="amethyst_walk", gain=0.4},
|
||||
dug = {name="amethyst_break", gain=0.44},
|
||||
})
|
||||
|
||||
-- Amethyst block
|
||||
minetest.register_node("mcl_amethyst:amethyst_block",{
|
||||
description = S("Block of Amethyst"),
|
||||
|
@ -13,7 +18,7 @@ minetest.register_node("mcl_amethyst:amethyst_block",{
|
|||
pickaxey = 1,
|
||||
building_block = 1,
|
||||
},
|
||||
sounds = mcl_sounds.node_sound_glass_defaults(),
|
||||
sounds = sounds,
|
||||
is_ground_content = true,
|
||||
stack_max = 64,
|
||||
_doc_items_longdesc = S("The Block of Amethyst is a decoration block crafted from amethyst shards."),
|
||||
|
@ -31,7 +36,7 @@ minetest.register_node("mcl_amethyst:budding_amethyst_block",{
|
|||
building_block = 1,
|
||||
dig_by_piston = 1,
|
||||
},
|
||||
sounds = mcl_sounds.node_sound_glass_defaults(),
|
||||
sounds = sounds,
|
||||
is_ground_content = true,
|
||||
stack_max = 64,
|
||||
_doc_items_longdesc = S("The Budding Amethyst can grow amethyst"),
|
||||
|
@ -87,25 +92,28 @@ minetest.register_node("mcl_amethyst:tinted_glass",{
|
|||
-- Amethyst Cluster
|
||||
local bud_def = {
|
||||
{
|
||||
size = "small",
|
||||
description = S("Small Amethyst Bud"),
|
||||
long_desc = S("Small Amethyst Bud is the first growth of amethyst bud."),
|
||||
light_source = 3,
|
||||
next_stage = "mcl_amethyst:medium_amethyst_bud",
|
||||
size = "small",
|
||||
description = S("Small Amethyst Bud"),
|
||||
long_desc = S("Small Amethyst Bud is the first growth of amethyst bud."),
|
||||
light_source = 3,
|
||||
next_stage = "mcl_amethyst:medium_amethyst_bud",
|
||||
selection_box = { -4/16, -7/16, -4/16, 4/16, -3/16, 4/16 },
|
||||
},
|
||||
{
|
||||
size = "medium",
|
||||
description = S("Medium Amethyst Bud"),
|
||||
long_desc = S("Medium Amethyst Bud is the second growth of amethyst bud."),
|
||||
light_source = 4,
|
||||
next_stage = "mcl_amethyst:large_amethyst_bud",
|
||||
size = "medium",
|
||||
description = S("Medium Amethyst Bud"),
|
||||
long_desc = S("Medium Amethyst Bud is the second growth of amethyst bud."),
|
||||
light_source = 4,
|
||||
next_stage = "mcl_amethyst:large_amethyst_bud",
|
||||
selection_box = { -4.5/16, -8/16, -4.5/16, 4.5/16, -2/16, 4.5/16 },
|
||||
},
|
||||
{
|
||||
size = "large",
|
||||
description = S("Large Amethyst Bud"),
|
||||
long_desc = S("Large Amethyst Bud is the third growth of amethyst bud."),
|
||||
light_source = 5,
|
||||
next_stage = "mcl_amethyst:amethyst_cluster",
|
||||
size = "large",
|
||||
description = S("Large Amethyst Bud"),
|
||||
long_desc = S("Large Amethyst Bud is the third growth of amethyst bud."),
|
||||
light_source = 5,
|
||||
next_stage = "mcl_amethyst:amethyst_cluster",
|
||||
selection_box = { -4.5/16, -8/16, -4.5/16, 4.5/16, -1/16, 4.5/16 },
|
||||
},
|
||||
}
|
||||
for _, def in pairs(bud_def) do
|
||||
|
@ -125,6 +133,7 @@ for _, def in pairs(bud_def) do
|
|||
drawtype = "plantlike",
|
||||
use_texture_alpha = "clip",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
light_source = def.light_source,
|
||||
groups = {
|
||||
dig_by_water = 1,
|
||||
|
@ -135,13 +144,10 @@ for _, def in pairs(bud_def) do
|
|||
amethyst_buds = 1,
|
||||
attached_node = 1,
|
||||
},
|
||||
sounds = sounds,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 },
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 },
|
||||
fixed = def.selection_box
|
||||
},
|
||||
_mcl_silk_touch_drop = true,
|
||||
_mcl_amethyst_next_grade = def.next_stage,
|
||||
|
@ -173,6 +179,7 @@ minetest.register_node("mcl_amethyst:amethyst_cluster",{
|
|||
paramtype1 = "light",
|
||||
use_texture_alpha = "clip",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
light_source = 7,
|
||||
groups = {
|
||||
dig_by_water = 1,
|
||||
|
@ -182,13 +189,10 @@ minetest.register_node("mcl_amethyst:amethyst_cluster",{
|
|||
deco_block = 1,
|
||||
attached_node = 1,
|
||||
},
|
||||
sounds = sounds,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 },
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 },
|
||||
fixed = { -4.8/16, -8/16, -4.8/16, 4.8/16, 3.9/16, 4.8/16 },
|
||||
},
|
||||
_mcl_silk_touch_drop = true,
|
||||
})
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue