added carrots (2)

This commit is contained in:
cale 2016-12-25 12:44:51 +01:00
parent c27901a83b
commit b3350a41c1
2 changed files with 19 additions and 3 deletions

View File

@ -172,10 +172,13 @@ minetest.register_abm({
minetest.set_node(pos, {name = "air"})
if math.random(2) == 1 then
local path = minetest.get_modpath("default") .. "/schematics/tree2.mts"
minetest.place_schematic({x = pos.x - 1, y = pos.y - 0, z = pos.z - 1}, path, 0, nil, false)
else
minetest.place_schematic({x = pos.x - 1, y = pos.y - 1, z = pos.z - 1}, path, 0, nil, false)
elseif math.random(2) == 1 then
local path = minetest.get_modpath("default") .. "/schematics/tree1.mts"
minetest.place_schematic({x = pos.x - 2, y = pos.y - 0, z = pos.z - 2}, path, 0, nil, false)
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, path, 0, nil, false)
else
local path = minetest.get_modpath("default") .. "/schematics/tree3.mts"
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, path, 0, nil, false)
end
end,
})

View File

@ -69,6 +69,19 @@ farming.register_plant("carrot", 3, {
drop_texture = "farming_carrot.png",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:grass"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {
"grassland", "forest"
},
y_min = 0,
y_max = 31000,
decoration = "farming:carrot_3",
})
minetest.override_item("default:plant_grass", {drop = {
max_items = 1,
items = {