From cfd05614600967dd4bc6a75d0ea1520f97790348 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 18 Jan 2017 09:39:55 +0000 Subject: [PATCH] added sand deco --- README.md | 2 +- init.lua | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f75fcb4..2e94b37 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ The api.txt document shows how to add your own saplings, crops and grasses to the list by using one of the 3 commands included and the mod.lua file gives you many examples by using some of the popular mods available. -https://forum.minetest.net/viewtopic.php?f=9&t=13284 +https://forum.minetest.net/viewtopic.php?f=9&t=16446 Changelog: diff --git a/init.lua b/init.lua index 657bc16..5ecd3e7 100644 --- a/init.lua +++ b/init.lua @@ -196,7 +196,10 @@ local flowers = { -- default biomes deco local deco = { - {"default:dirt_with_dry_grass", dry_grass, flowers} + {"default:dirt_with_dry_grass", dry_grass, flowers}, + {"default:sand", {}, {"default:dry_shrub", "air", "air"} }, + {"default:desert_sand", {}, {"default:dry_shrub", "air", "air"} }, + {"default:silver_sand", {}, {"default:dry_shrub", "air", "air"} }, } -- add grass and flower/plant decoration for specific dirt types @@ -215,7 +218,7 @@ local function check_soil(pos, nodename) local dirt = minetest.find_nodes_in_area_under_air( {x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, {x = pos.x + 2, y = pos.y + 1, z = pos.z + 2}, - {"group:soil"}) + {"group:soil", "group:sand"}) -- set default grass and decoration local grass = green_grass @@ -297,7 +300,8 @@ minetest.register_craftitem("bonemeal:bonemeal", { check_crops(pos, node.name) -- grow grass and flowers - if minetest.get_item_group(node.name, "soil") > 0 then + if minetest.get_item_group(node.name, "soil") > 0 + or minetest.get_item_group(node.name, "sand") > 0 then check_soil(pos, node.name) end