summaryrefslogtreecommitdiff
path: root/grass.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-03-10 17:45:55 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2016-03-10 17:45:55 +0000
commitdaac92f3983afd8e1ff63c4043547d03519ef460 (patch)
tree4dd7ae04f10559a5a54cc93095db49922f3f28e0 /grass.lua
parenta91b9807974440c5a6487a4446ada29e382d7061 (diff)
Added barley, tidied and tweaked code
Diffstat (limited to 'grass.lua')
-rw-r--r--grass.lua20
1 files changed, 17 insertions, 3 deletions
diff --git a/grass.lua b/grass.lua
index 288299b..aacb220 100644
--- a/grass.lua
+++ b/grass.lua
@@ -1,7 +1,7 @@
--- Override default grass and have it drop Wheat Seeds
+for i = 3, 5 do
-for i = 1, 5 do
+ -- Override default grass and have it drop Wheat Seeds
minetest.override_item("default:grass_" .. i, {
drop = {
@@ -13,6 +13,20 @@ for i = 1, 5 do
},
})
+ -- Override default dry grass and have it drop Barley Seeds
+ if minetest.registered_nodes["default:dry_grass_1"] then
+
+ minetest.override_item("default:dry_grass_" .. i, {
+ drop = {
+ max_items = 1,
+ items = {
+ {items = {'farming:seed_barley'}, rarity = 6},
+ {items = {'default:dry_grass_1'}},
+ }
+ },
+ })
+ end
+
end
-- Override default Jungle Grass and have it drop Cotton Seeds
@@ -25,4 +39,4 @@ minetest.override_item("default:junglegrass", {
{items = {'default:junglegrass'}},
}
},
-}) \ No newline at end of file
+})