#11 Polish amethyst stuff

This commit is contained in:
kay27 2022-02-06 04:32:44 +04:00 committed by cora
parent 1a83f50505
commit 74322ead49
9 changed files with 32 additions and 28 deletions

View File

@ -48,7 +48,7 @@ minetest.register_abm({
local check_node_name = check_node.name 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 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 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) minetest.swap_node(check_pos, new_node)
end, end,
}) })

View File

@ -1,6 +1,11 @@
local S = minetest.get_translator(minetest.get_current_modname()) local S = minetest.get_translator(minetest.get_current_modname())
mcl_amethyst = {} 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 -- Amethyst block
minetest.register_node("mcl_amethyst:amethyst_block",{ minetest.register_node("mcl_amethyst:amethyst_block",{
description = S("Block of Amethyst"), description = S("Block of Amethyst"),
@ -11,7 +16,7 @@ minetest.register_node("mcl_amethyst:amethyst_block",{
pickaxey = 1, pickaxey = 1,
building_block = 1, building_block = 1,
}, },
sounds = mcl_sounds.node_sound_glass_defaults(), sounds = sounds,
is_ground_content = true, is_ground_content = true,
stack_max = 64, stack_max = 64,
_doc_items_longdesc = S("The Block of Amethyst is a decoration block crafted from amethyst shards."), _doc_items_longdesc = S("The Block of Amethyst is a decoration block crafted from amethyst shards."),
@ -28,7 +33,7 @@ minetest.register_node("mcl_amethyst:budding_amethyst_block",{
building_block = 1, building_block = 1,
dig_by_piston = 1, dig_by_piston = 1,
}, },
sounds = mcl_sounds.node_sound_glass_defaults(), sounds = sounds,
is_ground_content = true, is_ground_content = true,
stack_max = 64, stack_max = 64,
_doc_items_longdesc = S("The Budding Amethyst can grow amethyst"), _doc_items_longdesc = S("The Budding Amethyst can grow amethyst"),
@ -90,6 +95,7 @@ local bud_def = {
long_desc = S("Small Amethyst Bud is the first growth of amethyst bud."), long_desc = S("Small Amethyst Bud is the first growth of amethyst bud."),
light_source = 3, light_source = 3,
next_stage = "mcl_amethyst:medium_amethyst_bud", next_stage = "mcl_amethyst:medium_amethyst_bud",
selection_box = { -4/16, -7/16, -4/16, 4/16, -3/16, 4/16 },
}, },
{ {
size = "medium", size = "medium",
@ -97,6 +103,7 @@ local bud_def = {
long_desc = S("Medium Amethyst Bud is the second growth of amethyst bud."), long_desc = S("Medium Amethyst Bud is the second growth of amethyst bud."),
light_source = 4, light_source = 4,
next_stage = "mcl_amethyst:large_amethyst_bud", 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", size = "large",
@ -104,6 +111,7 @@ local bud_def = {
long_desc = S("Large Amethyst Bud is the third growth of amethyst bud."), long_desc = S("Large Amethyst Bud is the third growth of amethyst bud."),
light_source = 5, light_source = 5,
next_stage = "mcl_amethyst:amethyst_cluster", 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 for _, def in pairs(bud_def) do
@ -123,6 +131,7 @@ for _, def in pairs(bud_def) do
drawtype = "plantlike", drawtype = "plantlike",
use_texture_alpha = "clip", use_texture_alpha = "clip",
sunlight_propagates = true, sunlight_propagates = true,
walkable = false,
light_source = def.light_source, light_source = def.light_source,
groups = { groups = {
dig_by_water = 1, dig_by_water = 1,
@ -133,13 +142,10 @@ for _, def in pairs(bud_def) do
amethyst_buds = 1, amethyst_buds = 1,
attached_node = 1, attached_node = 1,
}, },
sounds = sounds,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, fixed = def.selection_box
},
collision_box = {
type = "fixed",
fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 },
}, },
_mcl_silk_touch_drop = true, _mcl_silk_touch_drop = true,
_mcl_amethyst_next_grade = def.next_stage, _mcl_amethyst_next_grade = def.next_stage,
@ -171,6 +177,7 @@ minetest.register_node("mcl_amethyst:amethyst_cluster",{
paramtype1 = "light", paramtype1 = "light",
use_texture_alpha = "clip", use_texture_alpha = "clip",
sunlight_propagates = true, sunlight_propagates = true,
walkable = false,
light_source = 7, light_source = 7,
groups = { groups = {
dig_by_water = 1, dig_by_water = 1,
@ -180,13 +187,10 @@ minetest.register_node("mcl_amethyst:amethyst_cluster",{
deco_block = 1, deco_block = 1,
attached_node = 1, attached_node = 1,
}, },
sounds = sounds,
selection_box = { selection_box = {
type = "fixed", 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 },
},
collision_box = {
type = "fixed",
fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 },
}, },
_mcl_silk_touch_drop = true, _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.