+minetest.register_node("default:papyrus", {
+ description = "Papyrus",
+ drawtype = "plantlike",
+ tiles = {"default_papyrus.png"},
+ inventory_image = "default_papyrus.png",
+ wield_image = "default_papyrus.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
+ },
+ groups = {snappy=3,flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+
+ after_dig_node = function(pos, node, metadata, digger)
+ default.dig_up(pos, node, digger)
+ end,
+})
+
+minetest.register_node("default:dry_shrub", {
+ description = "Dry Shrub",
+ drawtype = "plantlike",
+ waving = 1,
+ visual_scale = 1.0,
+ tiles = {"default_dry_shrub.png"},
+ inventory_image = "default_dry_shrub.png",
+ wield_image = "default_dry_shrub.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ buildable_to = 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, -5/16, 0.5},
+ },
+})
+
+minetest.register_node("default:junglegrass", {
+ description = "Jungle Grass",
+ drawtype = "plantlike",
+ waving = 1,
+ visual_scale = 1.3,
+ tiles = {"default_junglegrass.png"},
+ inventory_image = "default_junglegrass.png",
+ wield_image = "default_junglegrass.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ buildable_to = true,
+ 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, -5/16, 0.5},
+ },
+})
+
+minetest.register_node("default:grass_1", {
+ description = "Grass",
+ drawtype = "plantlike",
+ waving = 1,
+ tiles = {"default_grass_1.png"},
+ -- Use texture of a taller grass stage in inventory
+ inventory_image = "default_grass_3.png",
+ wield_image = "default_grass_3.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ buildable_to = true,
+ groups = {snappy=3,flammable=3,flora=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 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,
+})
+
+for i=2,5 do
+ minetest.register_node("default:grass_"..i, {
+ description = "Grass",
+ drawtype = "plantlike",
+ waving = 1,
+ tiles = {"default_grass_"..i..".png"},
+ inventory_image = "default_grass_"..i..".png",
+ wield_image = "default_grass_"..i..".png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ buildable_to = true,
+ drop = "default:grass_1",
+ groups = {snappy=3,flammable=3,flora=1,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, -5/16, 0.5},
+ },
+ })
+end
+
+minetest.register_node("default:dry_grass_1", {
+ description = "Dry Grass",
+ drawtype = "plantlike",
+ waving = 1,
+ tiles = {"default_dry_grass_1.png"},
+ inventory_image = "default_dry_grass_3.png",
+ wield_image = "default_dry_grass_3.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ buildable_to = true,
+ groups = {snappy=3,flammable=3,flora=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
+ },
+
+ on_place = function(itemstack, placer, pointed_thing)
+ -- place a random dry grass node
+ local stack = ItemStack("default:dry_grass_"..math.random(1,5))
+ local ret = minetest.item_place(stack, placer, pointed_thing)
+ return ItemStack("default:dry_grass_1 "..itemstack:get_count()-(1-ret:get_count()))
+ end,
+})
+
+for i=2,5 do
+ minetest.register_node("default:dry_grass_"..i, {
+ description = "Dry Grass",
+ drawtype = "plantlike",
+ waving = 1,
+ tiles = {"default_dry_grass_"..i..".png"},
+ inventory_image = "default_dry_grass_"..i..".png",
+ wield_image = "default_dry_grass_"..i..".png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ buildable_to = true,
+ groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
+ drop = "default:dry_grass_1",
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
+ },
+ })
+end
+
+--
+-- Liquids
+--
+
+minetest.register_node("default:water_source", {
+ description = "Water Source",
+ inventory_image = minetest.inventorycube("default_water.png"),
+ drawtype = "liquid",
+ tiles = {
+ {
+ name = "default_water_source_animated.png",
+ animation = {
+ type = "vertical_frames",
+ aspect_w = 16,
+ aspect_h = 16,
+ length = 2.0,
+ },
+ },
+ },
+ special_tiles = {
+ -- New-style water source material (mostly unused)
+ {
+ name = "default_water_source_animated.png",
+ animation = {
+ type = "vertical_frames",
+ aspect_w = 16,
+ aspect_h = 16,
+ length = 2.0,
+ },
+ backface_culling = false,
+ },
+ },
+ alpha = 160,
+ paramtype = "light",
+ walkable = false,
+ pointable = false,
+ diggable = false,
+ buildable_to = true,
+ is_ground_content = false,
+ drop = "",
+ drowning = 1,
+ liquidtype = "source",
+ liquid_alternative_flowing = "default:water_flowing",
+ liquid_alternative_source = "default:water_source",
+ liquid_viscosity = 1,
+ post_effect_color = {a=120, r=30, g=60, b=90},
+ groups = {water=3, liquid=3, puts_out_fire=1},