From b3350a41c10cd899ccacbc230f0b049846c8afa1 Mon Sep 17 00:00:00 2001 From: cale Date: Sun, 25 Dec 2016 12:44:51 +0100 Subject: [PATCH] added carrots (2) --- mods/default/trees.lua | 9 ++++++--- mods/farming/init.lua | 13 +++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/mods/default/trees.lua b/mods/default/trees.lua index b559fcb..9dcb35c 100644 --- a/mods/default/trees.lua +++ b/mods/default/trees.lua @@ -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, }) diff --git a/mods/farming/init.lua b/mods/farming/init.lua index fda3fb0..db20144 100644 --- a/mods/farming/init.lua +++ b/mods/farming/init.lua @@ -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 = {