diff --git a/nether/depends.txt b/nether/depends.txt new file mode 100644 index 0000000..a84d90e --- /dev/null +++ b/nether/depends.txt @@ -0,0 +1,2 @@ +obsidian + diff --git a/nether/init.lua b/nether/init.lua index 8241ee8..88f8ab3 100644 --- a/nether/init.lua +++ b/nether/init.lua @@ -277,7 +277,6 @@ for i,v in ipairs(HADES_THRONE_ABS) do end end HADES_THRONE_ENDPOS_ABS = {x=htx, y=hty, z=htz} -print("HTY:" .. hty) local nether = {} -- Check if file exists @@ -407,7 +406,6 @@ minetest.register_node("nether:nether_torch_bottom", { minetest.register_on_generated(function(minp, maxp) local addpos = {} hadesthronecounter = 1 - print("minp:" .. minp.y .. ", maxp:" .. maxp.y) if ((maxp.y >= NETHER_BOTTOM) and (minp.y <= NETHER_DEPTH)) then -- Pass 1: Terrain generation for x=minp.x, maxp.x, 1 do @@ -446,7 +444,6 @@ minetest.register_on_generated(function(minp, maxp) -- We don't want the Throne of Hades to get regenerated (especially since it will screw up portals) if (minp.x <= HADES_THRONE_STARTPOS_ABS.x) and (maxp.x >= HADES_THRONE_STARTPOS_ABS.x) and (minp.y <= HADES_THRONE_STARTPOS_ABS.y) and (maxp.y >= HADES_THRONE_STARTPOS_ABS.y) and (minp.z <= HADES_THRONE_STARTPOS_ABS.z) and (maxp.z >= HADES_THRONE_STARTPOS_ABS.z) and (nether:fileexists(HADES_THRONE_GENERATED) == false) then - print("RE:GENERATION") -- Pass 3: Make way for the Throne of Hades! for x=(HADES_THRONE_STARTPOS_ABS.x - 1), (HADES_THRONE_ENDPOS_ABS.x + 1), 1 do for z=(HADES_THRONE_STARTPOS_ABS.z - 1), (HADES_THRONE_ENDPOS_ABS.z + 1), 1 do @@ -463,7 +460,6 @@ minetest.register_on_generated(function(minp, maxp) end nether:touch(HADES_THRONE_GENERATED) end - print("DONE") end end) @@ -600,7 +596,6 @@ function nether:read_portals_to_nether() if not (line == "" or line == nil) then if line:sub(1, 1) == "p" then NETHER_PORTALS_TO_NETHER[table.getn(NETHER_PORTALS_TO_NETHER)+1] = array - print("X" .. array.x .. "Y" .. array.y .. "Z" .. array.z) elseif line:sub(1, 1) == "x" then array.x = tonumber(split(line, "x")[1]) elseif line:sub(1, 1) == "y" then @@ -760,4 +755,14 @@ minetest.register_abm({ end, }) +-- CRAFTING DEFINITIONS +minetest.register_craft({ + output = "nether:nether_portal_creator", + recipe = { + {"obsidian:obsidian_block", "obsidian:obsidian_block", "obsidian:obsidian_block"}, + {"obsidian:obsidian_block", "default:mese", "obsidian:obsidian_block"}, + {"obsidian:obsidian_block", "obsidian:obsidian_block", "obsidian:obsidian_block"}, + } +}) + print("Nether mod loaded!") diff --git a/nether/init.lua~ b/nether/init.lua~ index a561f1b..5a848d3 100644 --- a/nether/init.lua~ +++ b/nether/init.lua~ @@ -407,7 +407,6 @@ minetest.register_node("nether:nether_torch_bottom", { minetest.register_on_generated(function(minp, maxp) local addpos = {} hadesthronecounter = 1 - print("minp:" .. minp.y .. ", maxp:" .. maxp.y) if ((maxp.y >= NETHER_BOTTOM) and (minp.y <= NETHER_DEPTH)) then -- Pass 1: Terrain generation for x=minp.x, maxp.x, 1 do @@ -446,7 +445,6 @@ minetest.register_on_generated(function(minp, maxp) -- We don't want the Throne of Hades to get regenerated (especially since it will screw up portals) if (minp.x <= HADES_THRONE_STARTPOS_ABS.x) and (maxp.x >= HADES_THRONE_STARTPOS_ABS.x) and (minp.y <= HADES_THRONE_STARTPOS_ABS.y) and (maxp.y >= HADES_THRONE_STARTPOS_ABS.y) and (minp.z <= HADES_THRONE_STARTPOS_ABS.z) and (maxp.z >= HADES_THRONE_STARTPOS_ABS.z) and (nether:fileexists(HADES_THRONE_GENERATED) == false) then - print("RE:GENERATION") -- Pass 3: Make way for the Throne of Hades! for x=(HADES_THRONE_STARTPOS_ABS.x - 1), (HADES_THRONE_ENDPOS_ABS.x + 1), 1 do for z=(HADES_THRONE_STARTPOS_ABS.z - 1), (HADES_THRONE_ENDPOS_ABS.z + 1), 1 do @@ -463,7 +461,6 @@ minetest.register_on_generated(function(minp, maxp) end nether:touch(HADES_THRONE_GENERATED) end - print("DONE") end end) @@ -600,7 +597,6 @@ function nether:read_portals_to_nether() if not (line == "" or line == nil) then if line:sub(1, 1) == "p" then NETHER_PORTALS_TO_NETHER[table.getn(NETHER_PORTALS_TO_NETHER)+1] = array - print("X" .. array.x .. "Y" .. array.y .. "Z" .. array.z) elseif line:sub(1, 1) == "x" then array.x = tonumber(split(line, "x")[1]) elseif line:sub(1, 1) == "y" then @@ -701,7 +697,6 @@ end minetest.register_node("nether:nether_portal_creator", { description = "Nether Portal Creator", tile_images = {"nether_portal_creator.png"}, - inventory_image = "default_mese.png", }) minetest.register_abm({ nodenames = "nether:nether_portal_creator", @@ -761,4 +756,14 @@ minetest.register_abm({ end, }) +-- CRAFTING DEFINITIONS +minetest.register_craft({ + output = "nether:nether_portal_creator", + recipe = { + {"obsidian:obsidian_block", "obsidian:obsidian_block", "obsidian:obsidian_block"}, + {"obsidian:obsidian_block", "default:mese", "obsidian:obsidian_block"}, + {"obsidian:obsidian_block", "obsidian:obsidian_block", "obsidian:obsidian_block"}, + } +}) + print("Nether mod loaded!") diff --git a/obsidian/crafting.txt b/obsidian/crafting.txt new file mode 100644 index 0000000..b6d02ac --- /dev/null +++ b/obsidian/crafting.txt @@ -0,0 +1,81 @@ +Obsidian Crafting: + +LEGEND: x=obsidian block + o=nothing + i=obsidian rod + S=obsidian shard + c=coal lump + m=mese (or mese ore if you use the default mod from my texture pack) + r=ruby gemstone + a=obsidian arrowhead + + +Sword: +oxo +oxo +oio + +Axe: +xxo +xio +oio + +Pick: +xxx +oio +oio + +Shovel: +oxo +oio +oio + +Knife: +ooo +oao +oio + +Fence: +ooo +xxx +xxx + +Ladder: +xox +xxx +xox + +Torch: +ooo +oco +oio + +Obsidian Rod: +ooo +ooo +oox + +Bucket: +ooo +xox +oxo + +Door: +xxo +xxo +xxo + +Obsidian Shelf(with gemstones mod): +mrm +xxx +mxm + +Obsidian Shelf(without gemstones mod): +mxm +xxx +mxm + +Obsidian Block (reformed from shards) +sso +sso +ooo \ No newline at end of file diff --git a/obsidian/depends.txt b/obsidian/depends.txt new file mode 100644 index 0000000..3a7daa1 --- /dev/null +++ b/obsidian/depends.txt @@ -0,0 +1,2 @@ +default + diff --git a/obsidian/init.lua b/obsidian/init.lua new file mode 100644 index 0000000..9934692 --- /dev/null +++ b/obsidian/init.lua @@ -0,0 +1,54 @@ +minetest.register_node("obsidian:obsidian_block", { + tile_images = {"obsidian_block.png"}, + inventory_image = minetest.inventorycube("obsidian_block.png"), + is_ground_content = true, + groups = {oddly_breakable_by_hand=1}, + drop = "obsidian:obsidian_block", +}) + +minetest.register_abm({nodenames = {"default:lava_source"}, + interval = 1.0, + chance = 1, + action = function(pos, node, active_obsidianject_count, active_obsidianject_count_wider) + for i=-1,1 do + for j=-1,1 do + for k=-1,1 do + p = {x=pos.x+i, y=pos.y+j, z=pos.z+k} + n = minetest.env:get_node(p) + if (n.name == "default:water_flowing") or (n.name == "default:water_source") then + if not (((p.x > pos.x) and (p.z > pos.z)) or ((p.x < pos.x) and (p.z < pos.z)) or ((p.x < pos.x) and (p.z > pos.z)) or ((p.x > pos.x) and (p.z < pos.z))) then + minetest.env:add_node(pos, {name="obsidian:obsidian_block"}) + end + end + end + end + end + end +}) + +minetest.register_abm({nodenames = {"default:lava_flowing"}, + interval = 1.0, + chance = 1, + action = function(pos, node, active_obsidianject_count, active_obsidianject_count_wider) + for i=-1,1 do + for j=-1,1 do + for k=-1,1 do + p = {x=pos.x+i, y=pos.y+j, z=pos.z+k} + n = minetest.env:get_node(p) + if (n.name == "default:water_flowing") or (n.name == "default:water_source") then + if not (((p.x > pos.x) and (p.z > pos.z)) or ((p.x < pos.x) and (p.z < pos.z)) or ((p.x < pos.x) and (p.z > pos.z)) or ((p.x > pos.x) and (p.z < pos.z))) then + if (j == -1) then + minetest.env:add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name="obsidian:obsidian_block"}) + else + minetest.env:add_node(pos, {name="cobble"}) + end + end + end + end + end + end + end +}) + +print( 'Obsidian Mod Loaded! ' ) + diff --git a/obsidian/init.lua~ b/obsidian/init.lua~ new file mode 100644 index 0000000..12aca81 --- /dev/null +++ b/obsidian/init.lua~ @@ -0,0 +1,54 @@ +minetest.register_node("obsidian:obsidian_block", { + tile_images = {"obsidian_block.png"}, + inventory_image = minetest.inventorycube("obsidian_block.png"), + is_ground_content = true, + groups = {oddly_breakable_by_hand=1}, + drop = "obsidian:obsidian_block", +}) + +minetest.register_abm({nodenames = {"default:lava_source"}, + interval = 1.0, + chance = 1, + action = function(pos, node, active_obsidianject_count, active_obsidianject_count_wider) + for i=-1,1 do + for j=-1,1 do + for k=-1,1 do + p = {x=pos.x+i, y=pos.y+j, z=pos.z+k} + n = minetest.env:get_node(p) + if (n.name == "default:water_flowing") or (n.name == "default:water_source") then + if not ((p.x > pos.x) and (p.z > pos.z)) or ((p.x < pos.x) and (p.z < pos.z)) or ((p.x < pos.x) and (p.z > pos.z)) or ((p.x > pos.x) and (p.z < pos.z)) then + minetest.env:add_node(pos, {name="obsidian:obsidian_block"}) + end + end + end + end + end + end +}) + +minetest.register_abm({nodenames = {"default:lava_flowing"}, + interval = 1.0, + chance = 1, + action = function(pos, node, active_obsidianject_count, active_obsidianject_count_wider) + for i=-1,1 do + for j=-1,1 do + for k=-1,1 do + p = {x=pos.x+i, y=pos.y+j, z=pos.z+k} + n = minetest.env:get_node(p) + if (n.name == "default:water_flowing") or (n.name == "default:water_source") then + if not (((p.x > pos.x) and (p.z > pos.z)) or ((p.x < pos.x) and (p.z < pos.z)) or ((p.x < pos.x) and (p.z > pos.z)) or ((p.x > pos.x) and (p.z < pos.z))) then + if (j == -1) then + minetest.env:add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name="obsidian:obsidian_block"}) + else + minetest.env:add_node(pos, {name="cobble"}) + end + end + end + end + end + end + end +}) + +print( 'Obsidian Mod Loaded! ' ) + diff --git a/obsidian/textures/obsidian_block.png b/obsidian/textures/obsidian_block.png new file mode 100644 index 0000000..16ebe0b Binary files /dev/null and b/obsidian/textures/obsidian_block.png differ