forked from mtcontrib/nether-pack
Added craft definitions for nether, and added obsidian mod
This commit is contained in:
parent
be5c41f76d
commit
d8e3a0864c
2
nether/depends.txt
Normal file
2
nether/depends.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
obsidian
|
||||||
|
|
@ -277,7 +277,6 @@ for i,v in ipairs(HADES_THRONE_ABS) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
HADES_THRONE_ENDPOS_ABS = {x=htx, y=hty, z=htz}
|
HADES_THRONE_ENDPOS_ABS = {x=htx, y=hty, z=htz}
|
||||||
print("HTY:" .. hty)
|
|
||||||
local nether = {}
|
local nether = {}
|
||||||
|
|
||||||
-- Check if file exists
|
-- Check if file exists
|
||||||
@ -407,7 +406,6 @@ minetest.register_node("nether:nether_torch_bottom", {
|
|||||||
minetest.register_on_generated(function(minp, maxp)
|
minetest.register_on_generated(function(minp, maxp)
|
||||||
local addpos = {}
|
local addpos = {}
|
||||||
hadesthronecounter = 1
|
hadesthronecounter = 1
|
||||||
print("minp:" .. minp.y .. ", maxp:" .. maxp.y)
|
|
||||||
if ((maxp.y >= NETHER_BOTTOM) and (minp.y <= NETHER_DEPTH)) then
|
if ((maxp.y >= NETHER_BOTTOM) and (minp.y <= NETHER_DEPTH)) then
|
||||||
-- Pass 1: Terrain generation
|
-- Pass 1: Terrain generation
|
||||||
for x=minp.x, maxp.x, 1 do
|
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)
|
-- 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)
|
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
|
then
|
||||||
print("RE:GENERATION")
|
|
||||||
-- Pass 3: Make way for the Throne of Hades!
|
-- 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 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
|
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
|
end
|
||||||
nether:touch(HADES_THRONE_GENERATED)
|
nether:touch(HADES_THRONE_GENERATED)
|
||||||
end
|
end
|
||||||
print("DONE")
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -600,7 +596,6 @@ function nether:read_portals_to_nether()
|
|||||||
if not (line == "" or line == nil) then
|
if not (line == "" or line == nil) then
|
||||||
if line:sub(1, 1) == "p" then
|
if line:sub(1, 1) == "p" then
|
||||||
NETHER_PORTALS_TO_NETHER[table.getn(NETHER_PORTALS_TO_NETHER)+1] = array
|
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
|
elseif line:sub(1, 1) == "x" then
|
||||||
array.x = tonumber(split(line, "x")[1])
|
array.x = tonumber(split(line, "x")[1])
|
||||||
elseif line:sub(1, 1) == "y" then
|
elseif line:sub(1, 1) == "y" then
|
||||||
@ -760,4 +755,14 @@ minetest.register_abm({
|
|||||||
end,
|
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!")
|
print("Nether mod loaded!")
|
||||||
|
@ -407,7 +407,6 @@ minetest.register_node("nether:nether_torch_bottom", {
|
|||||||
minetest.register_on_generated(function(minp, maxp)
|
minetest.register_on_generated(function(minp, maxp)
|
||||||
local addpos = {}
|
local addpos = {}
|
||||||
hadesthronecounter = 1
|
hadesthronecounter = 1
|
||||||
print("minp:" .. minp.y .. ", maxp:" .. maxp.y)
|
|
||||||
if ((maxp.y >= NETHER_BOTTOM) and (minp.y <= NETHER_DEPTH)) then
|
if ((maxp.y >= NETHER_BOTTOM) and (minp.y <= NETHER_DEPTH)) then
|
||||||
-- Pass 1: Terrain generation
|
-- Pass 1: Terrain generation
|
||||||
for x=minp.x, maxp.x, 1 do
|
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)
|
-- 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)
|
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
|
then
|
||||||
print("RE:GENERATION")
|
|
||||||
-- Pass 3: Make way for the Throne of Hades!
|
-- 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 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
|
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
|
end
|
||||||
nether:touch(HADES_THRONE_GENERATED)
|
nether:touch(HADES_THRONE_GENERATED)
|
||||||
end
|
end
|
||||||
print("DONE")
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -600,7 +597,6 @@ function nether:read_portals_to_nether()
|
|||||||
if not (line == "" or line == nil) then
|
if not (line == "" or line == nil) then
|
||||||
if line:sub(1, 1) == "p" then
|
if line:sub(1, 1) == "p" then
|
||||||
NETHER_PORTALS_TO_NETHER[table.getn(NETHER_PORTALS_TO_NETHER)+1] = array
|
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
|
elseif line:sub(1, 1) == "x" then
|
||||||
array.x = tonumber(split(line, "x")[1])
|
array.x = tonumber(split(line, "x")[1])
|
||||||
elseif line:sub(1, 1) == "y" then
|
elseif line:sub(1, 1) == "y" then
|
||||||
@ -701,7 +697,6 @@ end
|
|||||||
minetest.register_node("nether:nether_portal_creator", {
|
minetest.register_node("nether:nether_portal_creator", {
|
||||||
description = "Nether Portal Creator",
|
description = "Nether Portal Creator",
|
||||||
tile_images = {"nether_portal_creator.png"},
|
tile_images = {"nether_portal_creator.png"},
|
||||||
inventory_image = "default_mese.png",
|
|
||||||
})
|
})
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = "nether:nether_portal_creator",
|
nodenames = "nether:nether_portal_creator",
|
||||||
@ -761,4 +756,14 @@ minetest.register_abm({
|
|||||||
end,
|
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!")
|
print("Nether mod loaded!")
|
||||||
|
81
obsidian/crafting.txt
Normal file
81
obsidian/crafting.txt
Normal file
@ -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
|
2
obsidian/depends.txt
Normal file
2
obsidian/depends.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
default
|
||||||
|
|
54
obsidian/init.lua
Normal file
54
obsidian/init.lua
Normal file
@ -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! ' )
|
||||||
|
|
54
obsidian/init.lua~
Normal file
54
obsidian/init.lua~
Normal file
@ -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! ' )
|
||||||
|
|
BIN
obsidian/textures/obsidian_block.png
Normal file
BIN
obsidian/textures/obsidian_block.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue
Block a user