aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalinou <calinou9999spam@gmail.com>2013-08-28 10:50:18 +0200
committerCalinou <calinou9999spam@gmail.com>2013-08-28 10:50:18 +0200
commitee1b3025cc05e94b7311ed42b08142edbfe977e5 (patch)
tree39ac3855a7ae19c481d1e50bc2372e46f8ac9fbb
parent1fa318c1172566060b862a1df6610c117bfc6e52 (diff)
downloadmoreblocks-ee1b3025cc05e94b7311ed42b08142edbfe977e5.tar.gz
moreblocks-ee1b3025cc05e94b7311ed42b08142edbfe977e5.tar.bz2
moreblocks-ee1b3025cc05e94b7311ed42b08142edbfe977e5.zip
Make jungle grass drop cotton
-rw-r--r--redefinitions.lua103
1 files changed, 14 insertions, 89 deletions
diff --git a/redefinitions.lua b/redefinitions.lua
index 53b7171..07a28bc 100644
--- a/redefinitions.lua
+++ b/redefinitions.lua
@@ -169,105 +169,30 @@ minetest.register_node(":default:fence_wood", {
sounds = default.node_sound_wood_defaults(),
})
-minetest.register_node(":default:grass_1", {
- description = "Grass",
- drawtype = "plantlike",
- tiles = {"default_grass_1.png"},
- inventory_image = "default_grass_1.png",
- wield_image = "default_grass_1.png",
- paramtype = "light",
- walkable = false,
- sunlight_propagates = true,
- groups = {snappy=3,flammable=3,attached_node=1},
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
- },
- on_place = function(itemstack, placer, pointed_thing)
- -- place a random grass node
- local stack = ItemStack("default:grass_" .. math.random(1,5))
- local ret = minetest.item_place(stack, placer, pointed_thing)
- return ItemStack("default:grass_1 " .. itemstack:get_count()-(1-ret:get_count()))
- end,
-})
-
-minetest.register_node(":default:grass_2", {
- description = "Grass",
- drawtype = "plantlike",
- tiles = {"default_grass_2.png"},
- paramtype = "light",
- walkable = false,
- sunlight_propagates = true,
- drop = "default:grass_1",
- groups = {snappy=3,flammable=3,attached_node=1,not_in_creative_inventory=1},
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
- },
-})
-minetest.register_node(":default:grass_3", {
- description = "Grass",
- drawtype = "plantlike",
- tiles = {"default_grass_3.png"},
- paramtype = "light",
- walkable = false,
- sunlight_propagates = true,
- drop = "default:grass_1",
- groups = {snappy=3,flammable=3,attached_node=1,not_in_creative_inventory=1},
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
- },
-})
-
-minetest.register_node(":default:grass_4", {
- description = "Grass",
- drawtype = "plantlike",
- tiles = {"default_grass_4.png"},
- paramtype = "light",
- walkable = false,
- sunlight_propagates = true,
- drop = "default:grass_1",
- groups = {snappy=3,flammable=3,attached_node=1,not_in_creative_inventory=1},
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
- },
-})
-
-minetest.register_node(":default:grass_5", {
- description = "Grass",
- drawtype = "plantlike",
- tiles = {"default_grass_5.png"},
- paramtype = "light",
- walkable = false,
- sunlight_propagates = true,
- drop = "default:grass_1",
- groups = {snappy=3,flammable=3,attached_node=1,not_in_creative_inventory=1},
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
- },
-})
-
minetest.register_node(":default:junglegrass", {
description = "Jungle Grass",
drawtype = "plantlike",
- visual_scale = 1.25,
+ visual_scale = 1.3,
tiles = {"default_junglegrass.png"},
+ inventory_image = "default_junglegrass.png",
+ wield_image = "default_junglegrass.png",
paramtype = "light",
walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
sunlight_propagates = true,
- groups = {snappy=3,flammable=2,attached_node=1},
+ drop = {
+ max_items = 1,
+ items = {
+ {items = {'farming:seed_cotton'},rarity = 8},
+ {items = {'default:junglegrass'}},
+ }
+ },
+ groups = {snappy=3,flammable=2,flora=1,attached_node=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
+ fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})