Add Teosinte plant (Ancestor of corn)
This commit is contained in:
parent
028d07596f
commit
bd7d9afd43
@ -15,6 +15,7 @@ Optional Dependencies:
|
|||||||
|
|
||||||
For now this mod add:
|
For now this mod add:
|
||||||
- Wild carrot: spawn into biomes grassland, deciduous_forest and coniferous_forest.
|
- Wild carrot: spawn into biomes grassland, deciduous_forest and coniferous_forest.
|
||||||
|
- Teosinte: spawn into biome rainforest.
|
||||||
|
|
||||||
- Bunch of flowers:
|
- Bunch of flowers:
|
||||||
If farming mod is loaded then you can craft a bunch of flowers with any items from the flower group and a string of cotton.
|
If farming mod is loaded then you can craft a bunch of flowers with any items from the flower group and a string of cotton.
|
||||||
|
48
init.lua
48
init.lua
@ -30,7 +30,36 @@ local function add_simple_flower(name, desc, box, f_groups)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
moreflowers.datas = {
|
local function add_tall_flower(name, desc, box, f_groups)
|
||||||
|
f_groups.snappy = 3
|
||||||
|
f_groups.flower = 1
|
||||||
|
f_groups.flora = 1
|
||||||
|
f_groups.attached_node = 1
|
||||||
|
|
||||||
|
minetest.register_node("moreflowers:" .. name, {
|
||||||
|
description = desc,
|
||||||
|
drawtype = "plantlike",
|
||||||
|
waving = 1,
|
||||||
|
tiles = {"moreflowers_"..name..".png"},
|
||||||
|
inventory_image = "moreflowers_"..name..".png",
|
||||||
|
wield_image = "moreflowers_"..name..".png",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
stack_max = 99,
|
||||||
|
visual_scale = 1.3,
|
||||||
|
wield_scale = {x=1, y=1.5, z=1},
|
||||||
|
groups = f_groups,
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = box
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
moreflowers.datas_simple = {
|
||||||
{
|
{
|
||||||
"wild_carrot",
|
"wild_carrot",
|
||||||
"Wild Carrot",
|
"Wild Carrot",
|
||||||
@ -38,11 +67,23 @@ moreflowers.datas = {
|
|||||||
{flammable = 1}
|
{flammable = 1}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
moreflowers.datas_tall = {
|
||||||
|
{
|
||||||
|
"teosinte",
|
||||||
|
"Teosinte",
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, 1.2, 0.5},
|
||||||
|
{flammable = 1}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
for _,item in pairs(moreflowers.datas) do
|
for _,item in pairs(moreflowers.datas_simple) do
|
||||||
add_simple_flower(unpack(item))
|
add_simple_flower(unpack(item))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for _,item in pairs(moreflowers.datas_tall) do
|
||||||
|
add_tall_flower(unpack(item))
|
||||||
|
end
|
||||||
|
|
||||||
-- Plant spread TODO ?
|
-- Plant spread TODO ?
|
||||||
|
|
||||||
-- Bunch of flowers
|
-- Bunch of flowers
|
||||||
@ -102,7 +143,8 @@ if minetest.get_modpath("bonemeal") and bonemeal then
|
|||||||
}
|
}
|
||||||
local flowers = {
|
local flowers = {
|
||||||
"flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium",
|
"flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium",
|
||||||
"flowers:rose", "flowers:tulip", "flowers:viola", "moreflowers:wild_carrot"
|
"flowers:rose", "flowers:tulip", "flowers:viola", "moreflowers:wild_carrot",
|
||||||
|
"moreflowers:teosinte",
|
||||||
}
|
}
|
||||||
|
|
||||||
local dirt_with_grass_deco = {
|
local dirt_with_grass_deco = {
|
||||||
|
36
mapgen.lua
36
mapgen.lua
@ -18,7 +18,7 @@ local function register_mgv6_flower(name)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function register_flower(seed, name)
|
--[[local function register_flower(seed, name, biomes_list)
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"default:dirt_with_grass"},
|
place_on = {"default:dirt_with_grass"},
|
||||||
@ -37,13 +37,43 @@ local function register_flower(seed, name)
|
|||||||
decoration = "moreflowers:" .. name,
|
decoration = "moreflowers:" .. name,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
--]]
|
||||||
function moreflowers.register_mgv6_decorations()
|
function moreflowers.register_mgv6_decorations()
|
||||||
register_mgv6_flower("wild_carrot")
|
register_mgv6_flower("wild_carrot")
|
||||||
end
|
end
|
||||||
|
|
||||||
function moreflowers.register_decorations()
|
function moreflowers.register_decorations()
|
||||||
register_flower(368, "wild_carrot")
|
-- register_flower(368, "wild_carrot")
|
||||||
|
minetest.register_decoration(
|
||||||
|
{
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"default:dirt_with_grass"},
|
||||||
|
sidelen = 16,
|
||||||
|
noise_params = {
|
||||||
|
offset = -0.015,
|
||||||
|
scale = 0.025,
|
||||||
|
spread = {x = 200, y = 200, z = 200},
|
||||||
|
seed = 368,
|
||||||
|
octaves = 3,
|
||||||
|
persist = 0.6
|
||||||
|
},
|
||||||
|
biomes = {"grassland", "deciduous_forest", "coniferous_forest"},
|
||||||
|
y_min = 1,
|
||||||
|
y_max = 31000,
|
||||||
|
decoration = "moreflowers:wild_carrot",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_decoration(
|
||||||
|
{
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"default:dirt_with_grass"},
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 0.001,
|
||||||
|
biomes = {"rainforest"},
|
||||||
|
decoration = "moreflowers:teosinte",
|
||||||
|
height = 1,
|
||||||
|
})
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- detect mapgen
|
-- detect mapgen
|
||||||
|
BIN
textures/moreflowers_teosinte.png
Normal file
BIN
textures/moreflowers_teosinte.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 267 B |
Loading…
Reference in New Issue
Block a user