Skip to content
Snippets Groups Projects
Commit 7db8a512 authored by tenplus1's avatar tenplus1
Browse files

Updated for 0.4.11 dev and above

parent 41e4423d
No related branches found
No related tags found
No related merge requests found
......@@ -148,7 +148,7 @@ minetest.register_tool("ethereal:shovel_crystal", {
local inv = user:get_inventory()
minetest.env:remove_node(pointed_thing.under)
minetest.remove_node(pointed_thing.under)
nodeupdate(pos)
inv:add_item("main", {name = nn})
......
......@@ -285,9 +285,9 @@ minetest.register_tool("ethereal:light_staff", {
local node = minetest.get_node(pos).name
if node == "default:stone" then
minetest.env:add_node(pos, {name="ethereal:glostone"})
minetest.add_node(pos, {name="ethereal:glostone"})
elseif node == "ethereal:glostone" then
minetest.env:add_node(pos, {name="default:stone"})
minetest.add_node(pos, {name="default:stone"})
end
if not minetest.setting_getbool("creative_mode") then
......
......@@ -49,7 +49,7 @@ minetest.register_craftitem("ethereal:fishing_rod_baited", {
liquids_pointable = true,
on_use = function (itemstack, user, pointed_thing)
if pointed_thing and pointed_thing.under then
local node = minetest.env:get_node(pointed_thing.under)
local node = minetest.get_node(pointed_thing.under)
if string.find(node.name, "default:water_source") then
if math.random(1, 100) < 5 then
local inv = user:get_inventory()
......
--[[
Minetest Ethereal Mod 1.14 (4th Feb 2015)
Minetest Ethereal Mod 1.14 (1st March 2015)
Created by ChinChow
......@@ -54,8 +54,8 @@ dofile(minetest.get_modpath("ethereal").."/sealife.lua")
dofile(minetest.get_modpath("ethereal").."/fences.lua")
dofile(minetest.get_modpath("ethereal").."/gates.lua")
dofile(minetest.get_modpath("ethereal").."/stairs.lua")
dofile(minetest.get_modpath("ethereal").."/mapgen_v7s.lua")
--dofile(minetest.get_modpath("ethereal").."/mapgen_v7n.lua") -- 0.4.11 dev only
--dofile(minetest.get_modpath("ethereal").."/mapgen_v7s.lua") -- 0.4.11 and below
dofile(minetest.get_modpath("ethereal").."/mapgen_v7n.lua") -- 0.4.11 dev and above
-- Xanadu server Only
--dofile(minetest.get_modpath("ethereal").."/plantpack.lua")
......@@ -40,7 +40,7 @@ ethereal.register_sapling( "ethereal:acacia_sapling", "Acacia Sapling", "moretre
ethereal.place_tree = function (pos, ofx, ofz, schem)
-- Remove Sapling and Place Tree Schematic
minetest.env:set_node(pos, {name="air"})
minetest.set_node(pos, {name="air"})
pos.x = pos.x - ofx
pos.z = pos.z - ofz
minetest.place_schematic(pos, minetest.get_modpath("ethereal").."/schematics/"..schem..".mts", "0", {}, false );
......
......@@ -66,9 +66,9 @@ minetest.register_abm({
local pos0 = {x=pos.x-1,y=pos.y-1,z=pos.z-1}
local pos1 = {x=pos.x+1,y=pos.y+1,z=pos.z+1}
local water = minetest.env:find_nodes_in_area(pos0, pos1, "default:water_source")
local water = minetest.find_nodes_in_area(pos0, pos1, "default:water_source")
if water then
minetest.env:set_node(water[1], {name="default:ice"})
minetest.set_node(water[1], {name="default:ice"})
end
end,
})
......@@ -118,12 +118,30 @@ minetest.register_abm({
local pos0 = {x=pos.x-1,y=pos.y-1,z=pos.z-1}
local pos1 = {x=pos.x+1,y=pos.y+1,z=pos.z+1}
local water = minetest.env:find_nodes_in_area(pos0, pos1, "group:water")
local water = minetest.find_nodes_in_area(pos0, pos1, "group:water")
if water then
for n = 1, #water do
minetest.env:set_node(water[n], {name="air"})
minetest.set_node(water[n], {name="air"})
end
end
end,
})
]]
--[[
-- If torch next to water then drop torch
minetest.register_abm({
nodenames = {"default:torch"},
neighbors = {"default:water_source", "default:water_flowing"},
interval = 1,
chance = 1,
action = function(pos, node)
local pos0 = {x=pos.x-1,y=pos.y,z=pos.z-1}
local pos1 = {x=pos.x+1,y=pos.y+1,z=pos.z+1}
if #minetest.find_nodes_in_area(pos0, pos1, {"default:water_source", "default:water_flowing"}) > 0 then
minetest.set_node(pos, {name="default:water_flowing"})
minetest.add_item(pos, {name = "default:torch"})
end
end,
})
]]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment