diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 11b8984..686ea39 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -105,6 +105,10 @@ function default.drop_node_inventory() end end +-- FIXME this is bugged when a player is (timed-out?) +-- and a kick will result in a crash +-- Something about inv being nil? + function default.drop_player_inventory(pos, digger) pos.y = pos.y+1.5 local inv = digger:get_inventory() @@ -371,10 +375,13 @@ minetest.register_abm({ minetest.register_on_placenode(function(pos, newnode, placer, oldnode) if placer:is_player() then - if newnode.name == "default:sapling" then - if not minetest.find_node_near(pos, 8, {"group:water"}) then - minetest.set_node(pos, oldnode) - minetest.add_item(pos, {name="default:sapling"}) + if newnode.name == "default:sapling" or + newnode.name == "default:junglesapling" then + if pos.y < 14400 then + if not minetest.find_node_near(pos, 8, {"group:water"}) then + minetest.set_node(pos, oldnode) + minetest.add_item(pos, newnode) --{name="default:sapling"}) + end end end end diff --git a/mods/kalite/worldedge.lua b/mods/kalite/worldedge.lua index 5e7c1fd..512ba8c 100644 --- a/mods/kalite/worldedge.lua +++ b/mods/kalite/worldedge.lua @@ -1,9 +1,12 @@ minetest.register_node("kalite:plastic_grass", { description = "Plastic Grass", tiles = {"default_grass.png"}, - groups = {cracky = default.dig.cobble} + groups = {cracky=default.dig.cobble, soil=3} }) + +-- Map Generation + local c_cloud = minetest.get_content_id("default:cloud") local c_plastic_grass = minetest.get_content_id("kalite:plastic_grass") --local c_air = minetest.get_content_id("air") @@ -65,7 +68,12 @@ minetest.register_on_generated(function(minp, maxp, seed) end) --- Black sky in caves: +-- Black sky in caves +-- Damage players trying to dig to the bottom +-- TODO Damage players at world's edge. Possibly +-- teleport to the other side. Shouldn't have +-- to worry about the top, but put that in there +-- for completeness. local dur = 0