Move tall grass to mcl_flowers mod
Alias registered
This commit is contained in:
parent
bcdb3978cd
commit
d0b1f843ee
8 changed files with 47 additions and 44 deletions
|
@ -1691,38 +1691,6 @@ minetest.register_node("mcl_core:deadbush", {
|
|||
_mcl_hardness = 0,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_core:tallgrass", {
|
||||
description = "Tall Grass",
|
||||
_doc_items_longdesc = "Tall grass is a small plant which often occours on the surface of grasslands. It can be harvested for wheat seeds.",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"default_tallgrass.png"},
|
||||
inventory_image = "default_tallgrass.png",
|
||||
wield_image = "default_tallgrass.png",
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {'mcl_farming:wheat_seeds'},
|
||||
rarity = 8,
|
||||
},
|
||||
}
|
||||
},
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = true,
|
||||
groups = {dig_immediate=3, flammable=3,attached_node=1,dig_by_water=1,deco_block=1},
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, user)
|
||||
local item = user:get_wielded_item()
|
||||
if item:get_name() == "mcl_tools:shears" then
|
||||
minetest.add_item(pos, oldnode.name)
|
||||
end
|
||||
end,
|
||||
_mcl_blast_resistance = 0,
|
||||
_mcl_hardness = 0,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_core:ice", {
|
||||
description = "Ice",
|
||||
_doc_items_longdesc = "Ice is a translucent solid block usually found in cold areas.",
|
||||
|
|
|
@ -107,11 +107,11 @@ end
|
|||
mcl_dye.apply_bone_meal = function(pointed_thing)
|
||||
local plant_tab = {
|
||||
"air",
|
||||
"mcl_core:tallgrass",
|
||||
"mcl_core:tallgrass",
|
||||
"mcl_core:tallgrass",
|
||||
"mcl_core:tallgrass",
|
||||
"mcl_core:tallgrass",
|
||||
"mcl_flowers:tallgrass",
|
||||
"mcl_flowers:tallgrass",
|
||||
"mcl_flowers:tallgrass",
|
||||
"mcl_flowers:tallgrass",
|
||||
"mcl_flowers:tallgrass",
|
||||
"mcl_flowers:dandelion",
|
||||
"mcl_flowers:blue_orchid",
|
||||
"mcl_flowers:oxeye_daisy",
|
||||
|
@ -230,7 +230,7 @@ mcl_dye.apply_bone_meal = function(pointed_thing)
|
|||
return true
|
||||
|
||||
-- Grow tall grass into double tallgrass
|
||||
elseif n.name == "mcl_core:tallgrass" then
|
||||
elseif n.name == "mcl_flowers:tallgrass" then
|
||||
local toppos = { x=pos.x, y=pos.y+1, z=pos.z }
|
||||
local topnode = minetest.get_node(toppos)
|
||||
if minetest.registered_nodes[topnode.name].buildable_to then
|
||||
|
|
|
@ -52,6 +52,31 @@ local wheat_seed_drop = {
|
|||
}
|
||||
},
|
||||
|
||||
-- Tall Grass
|
||||
minetest.register_node("mcl_flowers:tallgrass", {
|
||||
description = "Tall Grass",
|
||||
_doc_items_longdesc = "Tall grass is a small plant which often occours on the surface of grasslands. It can be harvested for wheat seeds.",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"mcl_flowers_tallgrass.png"},
|
||||
inventory_image = "mcl_flowers_tallgrass.png",
|
||||
wield_image = "mcl_flowers_tallgrass.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = true,
|
||||
groups = {dig_immediate=3, flammable=3,attached_node=1,dig_by_water=1,deco_block=1},
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
drop = wheat_seed_drop,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, user)
|
||||
local item = user:get_wielded_item()
|
||||
if item:get_name() == "mcl_tools:shears" then
|
||||
minetest.add_item(pos, oldnode.name)
|
||||
end
|
||||
end,
|
||||
_mcl_blast_resistance = 0,
|
||||
_mcl_hardness = 0,
|
||||
})
|
||||
|
||||
--- Fern ---
|
||||
minetest.register_node("mcl_flowers:fern", {
|
||||
description = "Fern",
|
||||
|
@ -67,6 +92,12 @@ minetest.register_node("mcl_flowers:fern", {
|
|||
groups = {dig_immediate=3,flammable=2,attached_node=1,dig_by_water=1,deco_block=1},
|
||||
buildable_to = true,
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, user)
|
||||
local item = user:get_wielded_item()
|
||||
if item:get_name() == "mcl_tools:shears" then
|
||||
minetest.add_item(pos, oldnode.name)
|
||||
end
|
||||
end,
|
||||
drop = wheat_seed_drop,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
|
@ -224,5 +255,9 @@ minetest.register_node("mcl_flowers:waterlily", {
|
|||
end
|
||||
})
|
||||
|
||||
-- Legacy support
|
||||
minetest.register_alias("mcl_core:tallgrass", "mcl_flowers:tallgrass")
|
||||
|
||||
-- Show loading time
|
||||
local time_to_load= os.clock() - init
|
||||
print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))
|
||||
|
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Loading…
Add table
Add a link
Reference in a new issue