Version MFF.

This commit is contained in:
sys4-fr 2018-09-08 14:10:05 +02:00
parent 163bd4a021
commit 71236002de
139 changed files with 350 additions and 839 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
modpack.txt Normal file → Executable file
View File

View File

@ -1,365 +0,0 @@
--[[ Nether leaves
minetest.register_node("nether:leaves", {
description = "Nether Leaves",
drawtype = "allfaces_optional",
-- visual_scale = 1.189, --scale^2=sqrt(2)
tiles = {"nether_leaves.png"},
paramtype = "light",
groups = {snappy=3, leafdecay=2},
sounds = default.node_sound_leaves_defaults(),
})]]
--[[ Nether Lava
minetest.register_node("nether:lava_flowing", {
description = "Nether Lava (flowing)",
inventory_image = minetest.inventorycube("default_lava.png"),
drawtype = "flowingliquid",
tiles = {"default_lava.png"},
paramtype = "light",
light_source = LIGHT_MAX - 1,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "nether:lava_flowing",
liquid_alternative_source = "default:lava_source",
liquid_viscosity = LAVA_VISC,
damage_per_second = 4*2,
post_effect_color = {a=192, r=255, g=64, b=0},
special_materials = {
{image="default_lava.png", backface_culling=false},
{image="default_lava.png", backface_culling=true},
},
groups = {lava=3, liquid=2, hot=3},
})
minetest.register_node("nether:lava_source", {
description = "Nether Lava",
inventory_image = minetest.inventorycube("default_lava.png"),
drawtype = "liquid",
tiles = {"default_lava.png"},
paramtype = "light",
light_source = LIGHT_MAX - 1,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "nether:lava_flowing",
liquid_alternative_source = "default:lava_source",
liquid_viscosity = LAVA_VISC,
damage_per_second = 4*2,
post_effect_color = {a=192, r=255, g=64, b=0},
special_materials = {
-- New-style lava source material (mostly unused)
{image="default_lava.png", backface_culling=false},
},
groups = {lava=3, liquid=2, hot=3},
})]]
-- Throne of Hades
HADES_THRONE = {
-- Lava Moat
{pos={x=-1,y=-1,z=-1}, block="default:lava_source"},
{pos={x=-1,y=-1,z=0}, block="default:lava_source"},
{pos={x=-1,y=-1,z=1}, block="default:lava_source"},
{pos={x=-1,y=-1,z=2}, block="default:lava_source"},
{pos={x=-1,y=-1,z=3}, block="default:lava_source"},
{pos={x=-1,y=-1,z=4}, block="default:lava_source"},
{pos={x=-1,y=-1,z=5}, block="default:lava_source"},
{pos={x=-1,y=-1,z=6}, block="default:lava_source"},
{pos={x=-1,y=-1,z=7}, block="default:lava_source"},
{pos={x=0,y=-1,z=7}, block="default:lava_source"},
{pos={x=1,y=-1,z=7}, block="default:lava_source"},
{pos={x=2,y=-1,z=7}, block="default:lava_source"},
{pos={x=3,y=-1,z=7}, block="default:lava_source"},
{pos={x=4,y=-1,z=7}, block="default:lava_source"},
{pos={x=5,y=-1,z=7}, block="default:lava_source"},
{pos={x=6,y=-1,z=7}, block="default:lava_source"},
{pos={x=6,y=-1,z=6}, block="default:lava_source"},
{pos={x=6,y=-1,z=5}, block="default:lava_source"},
{pos={x=6,y=-1,z=4}, block="default:lava_source"},
{pos={x=6,y=-1,z=3}, block="default:lava_source"},
{pos={x=6,y=-1,z=2}, block="default:lava_source"},
{pos={x=6,y=-1,z=1}, block="default:lava_source"},
{pos={x=6,y=-1,z=0}, block="default:lava_source"},
{pos={x=6,y=-1,z=-1}, block="default:lava_source"},
{pos={x=5,y=-1,z=-1}, block="default:lava_source"},
{pos={x=4,y=-1,z=-1}, block="default:lava_source"},
{pos={x=3,y=-1,z=-1}, block="default:lava_source"},
{pos={x=2,y=-1,z=-1}, block="default:lava_source"},
{pos={x=1,y=-1,z=-1}, block="default:lava_source"},
{pos={x=0,y=-1,z=-1}, block="default:lava_source"},
-- Floor 1
{pos={x=0,y=0,z=0}, block="nether:netherrack"},
{pos={x=0,y=0,z=1}, block="nether:netherrack"},
{pos={x=0,y=0,z=2}, block="nether:netherrack"},
{pos={x=0,y=0,z=3}, block="nether:netherrack"},
{pos={x=0,y=0,z=4}, block="nether:netherrack"},
{pos={x=0,y=0,z=5}, block="nether:netherrack"},
{pos={x=1,y=0,z=5}, block="nether:netherrack"},
{pos={x=2,y=0,z=5}, block="nether:netherrack"},
{pos={x=3,y=0,z=5}, block="nether:netherrack"},
{pos={x=4,y=0,z=5}, block="nether:netherrack"},
{pos={x=5,y=0,z=5}, block="nether:netherrack"},
{pos={x=0,y=0,z=6}, block="nether:netherrack"},
{pos={x=1,y=0,z=6}, block="nether:netherrack"},
{pos={x=2,y=0,z=6}, block="nether:netherrack"},
{pos={x=3,y=0,z=6}, block="nether:netherrack"},
{pos={x=4,y=0,z=6}, block="nether:netherrack"},
{pos={x=5,y=0,z=6}, block="nether:netherrack"},
{pos={x=5,y=0,z=4}, block="nether:netherrack"},
{pos={x=5,y=0,z=3}, block="nether:netherrack"},
{pos={x=5,y=0,z=2}, block="nether:netherrack"},
{pos={x=5,y=0,z=1}, block="nether:netherrack"},
{pos={x=5,y=0,z=0}, block="nether:netherrack"},
{pos={x=4,y=0,z=0}, block="nether:netherrack"},
{pos={x=3,y=0,z=0}, block="nether:netherrack"},
{pos={x=2,y=0,z=0}, block="nether:netherrack"},
{pos={x=1,y=0,z=0}, block="nether:netherrack"},
-- Floor 2
{pos={x=0,y=1,z=0}, block="nether:netherrack"},
{pos={x=0,y=1,z=1}, block="nether:netherrack"},
{pos={x=0,y=1,z=2}, block="nether:netherrack"},
{pos={x=0,y=1,z=3}, block="nether:netherrack"},
{pos={x=0,y=1,z=4}, block="nether:netherrack"},
{pos={x=0,y=1,z=5}, block="nether:netherrack"},
{pos={x=1,y=1,z=5}, block="nether:netherrack"},
{pos={x=2,y=1,z=5}, block="nether:netherrack"},
{pos={x=3,y=1,z=5}, block="nether:netherrack"},
{pos={x=4,y=1,z=5}, block="nether:netherrack"},
{pos={x=5,y=1,z=5}, block="nether:netherrack"},
{pos={x=0,y=1,z=6}, block="nether:netherrack"},
{pos={x=1,y=1,z=6}, block="nether:netherrack"},
{pos={x=2,y=1,z=6}, block="nether:netherrack"},
{pos={x=3,y=1,z=6}, block="nether:netherrack"},
{pos={x=4,y=1,z=6}, block="nether:netherrack"},
{pos={x=5,y=1,z=6}, block="nether:netherrack"},
{pos={x=5,y=1,z=4}, block="nether:netherrack"},
{pos={x=5,y=1,z=3}, block="nether:netherrack"},
{pos={x=5,y=1,z=2}, block="nether:netherrack"},
{pos={x=5,y=1,z=1}, block="nether:netherrack"},
{pos={x=5,y=1,z=0}, block="nether:netherrack"},
{pos={x=4,y=1,z=0}, block="nether:netherrack"},
{pos={x=3,y=1,z=1}, block="nether:netherrack"},
{pos={x=2,y=1,z=1}, block="nether:netherrack"},
{pos={x=1,y=1,z=0}, block="nether:netherrack"},
{pos={x=1,y=1,z=1}, block="nether:netherrack"},
{pos={x=4,y=1,z=1}, block="nether:netherrack"},
-- Floor 3
{pos={x=0,y=2,z=0}, block="nether:netherrack"},
{pos={x=0,y=2,z=1}, block="nether:netherrack"},
{pos={x=0,y=2,z=2}, block="nether:netherrack"},
{pos={x=0,y=2,z=3}, block="nether:netherrack"},
{pos={x=0,y=2,z=4}, block="nether:netherrack"},
{pos={x=0,y=2,z=5}, block="nether:netherrack"},
{pos={x=1,y=2,z=5}, block="nether:netherrack"},
{pos={x=2,y=2,z=5}, block="nether:netherrack"},
{pos={x=3,y=2,z=5}, block="nether:netherrack"},
{pos={x=4,y=2,z=5}, block="nether:netherrack"},
{pos={x=5,y=2,z=5}, block="nether:netherrack"},
{pos={x=0,y=2,z=6}, block="nether:netherrack"},
{pos={x=1,y=2,z=6}, block="nether:netherrack"},
{pos={x=2,y=2,z=6}, block="nether:netherrack"},
{pos={x=3,y=2,z=6}, block="nether:netherrack"},
{pos={x=4,y=2,z=6}, block="nether:netherrack"},
{pos={x=5,y=2,z=6}, block="nether:netherrack"},
{pos={x=5,y=2,z=4}, block="nether:netherrack"},
{pos={x=5,y=2,z=3}, block="nether:netherrack"},
{pos={x=5,y=2,z=2}, block="nether:netherrack"},
{pos={x=5,y=2,z=1}, block="nether:netherrack"},
{pos={x=5,y=2,z=0}, block="nether:netherrack"},
{pos={x=4,y=2,z=0}, block="nether:netherrack"},
{pos={x=3,y=2,z=2}, block="nether:netherrack"},
{pos={x=2,y=2,z=2}, block="nether:netherrack"},
{pos={x=1,y=2,z=0}, block="nether:netherrack"},
{pos={x=1,y=2,z=1}, block="nether:netherrack"},
{pos={x=4,y=2,z=1}, block="nether:netherrack"},
{pos={x=1,y=2,z=2}, block="nether:netherrack"},
{pos={x=4,y=2,z=2}, block="nether:netherrack"},
-- Floor 4
{pos={x=0,y=3,z=0}, block="nether:netherrack"},
{pos={x=0,y=3,z=1}, block="nether:netherrack"},
{pos={x=0,y=3,z=2}, block="nether:netherrack"},
{pos={x=0,y=3,z=3}, block="nether:netherrack"},
{pos={x=0,y=3,z=4}, block="nether:netherrack"},
{pos={x=0,y=3,z=5}, block="nether:netherrack"},
{pos={x=1,y=3,z=5}, block="nether:netherrack"},
{pos={x=2,y=3,z=5}, block="nether:netherrack"},
{pos={x=3,y=3,z=5}, block="nether:netherrack"},
{pos={x=4,y=3,z=5}, block="nether:netherrack"},
{pos={x=5,y=3,z=5}, block="nether:netherrack"},
{pos={x=0,y=3,z=6}, block="nether:netherrack"},
{pos={x=1,y=3,z=6}, block="nether:netherrack"},
{pos={x=2,y=3,z=6}, block="nether:netherrack"},
{pos={x=3,y=3,z=6}, block="nether:netherrack"},
{pos={x=4,y=3,z=6}, block="nether:netherrack"},
{pos={x=5,y=3,z=6}, block="nether:netherrack"},
{pos={x=5,y=3,z=4}, block="nether:netherrack"},
{pos={x=5,y=3,z=3}, block="nether:netherrack"},
{pos={x=5,y=3,z=2}, block="nether:netherrack"},
{pos={x=5,y=3,z=1}, block="nether:netherrack"},
{pos={x=5,y=3,z=0}, block="nether:netherrack"},
{pos={x=4,y=3,z=0}, block="nether:netherrack"},
{pos={x=3,y=3,z=3}, block="nether:netherrack"},
{pos={x=2,y=3,z=3}, block="nether:netherrack"},
{pos={x=1,y=3,z=0}, block="nether:netherrack"},
{pos={x=1,y=3,z=1}, block="nether:netherrack"},
{pos={x=4,y=3,z=1}, block="nether:netherrack"},
{pos={x=1,y=3,z=2}, block="nether:netherrack"},
{pos={x=4,y=3,z=2}, block="nether:netherrack"},
{pos={x=1,y=3,z=3}, block="nether:netherrack"},
{pos={x=4,y=3,z=3}, block="nether:netherrack"},
{pos={x=1,y=3,z=4}, block="nether:netherrack"},
{pos={x=4,y=3,z=4}, block="nether:netherrack"},
{pos={x=2,y=3,z=4}, block="nether:netherrack"},
{pos={x=2,y=3,z=5}, block="nether:netherrack"},
{pos={x=3,y=3,z=4}, block="nether:netherrack"},
{pos={x=3,y=3,z=5}, block="nether:netherrack"},
-- Floor 5
{pos={x=2,y=4,z=4}, block="nether:netherrack"},
{pos={x=2,y=4,z=5}, block="nether:netherrack"},
{pos={x=3,y=4,z=4}, block="nether:netherrack"},
{pos={x=3,y=4,z=5}, block="nether:netherrack"},
{pos={x=2,y=4,z=6}, block="nether:netherrack"},
{pos={x=3,y=4,z=6}, block="nether:netherrack"},
-- Torches on floor 5
{pos={x=0,y=4,z=4}, block="nether:torch_bottom"},
{pos={x=1,y=4,z=4}, block="nether:torch_bottom"},
{pos={x=0,y=4,z=5}, block="nether:torch_bottom"},
{pos={x=1,y=4,z=5}, block="nether:torch_bottom"},
{pos={x=4,y=4,z=4}, block="nether:torch_bottom"},
{pos={x=5,y=4,z=4}, block="nether:torch_bottom"},
{pos={x=4,y=4,z=5}, block="nether:torch_bottom"},
{pos={x=5,y=4,z=5}, block="nether:torch_bottom"},
{pos={x=0,y=4,z=0}, block="nether:torch_bottom"},
{pos={x=1,y=4,z=0}, block="nether:torch_bottom"},
{pos={x=0,y=4,z=1}, block="nether:torch_bottom"},
{pos={x=1,y=4,z=1}, block="nether:torch_bottom"},
{pos={x=4,y=4,z=0}, block="nether:torch_bottom"},
{pos={x=5,y=4,z=0}, block="nether:torch_bottom"},
{pos={x=4,y=4,z=1}, block="nether:torch_bottom"},
{pos={x=5,y=4,z=1}, block="nether:torch_bottom"},
{pos={x=0,y=4,z=2}, block="nether:torch_bottom"},
{pos={x=1,y=4,z=2}, block="nether:torch_bottom"},
{pos={x=0,y=4,z=3}, block="nether:torch_bottom"},
{pos={x=1,y=4,z=3}, block="nether:torch_bottom"},
{pos={x=4,y=4,z=2}, block="nether:torch_bottom"},
{pos={x=5,y=4,z=2}, block="nether:torch_bottom"},
{pos={x=4,y=4,z=3}, block="nether:torch_bottom"},
{pos={x=5,y=4,z=3}, block="nether:torch_bottom"},
{pos={x=4,y=4,z=6}, block="nether:torch_bottom"},
{pos={x=5,y=4,z=6}, block="nether:torch_bottom"},
{pos={x=0,y=4,z=6}, block="nether:torch_bottom"},
{pos={x=1,y=4,z=6}, block="nether:torch_bottom"},
-- Nether Portal
{pos={x=1,y=5,z=6}, portalblock=true},
}
minetest.register_on_generated(function(minp, maxp, seed)
if minp.y <= 99 then
return
end
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local data = vm:get_data()
local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
local perlin1 = minetest.get_perlin(13,3, 0.5, 50) --Get map specific perlin
local perlin2 = minetest.get_perlin(133,3, 0.5, 10)
for x=minp.x, maxp.x, 1 do
for z=minp.z, maxp.z, 1 do
local test = perlin1:get2d({x=x, y=z})+1
local test2 = perlin2:get2d({x=x, y=z})
-- print(test)
if test2 < 0 then
h = 200+math.floor(test2*3+0.5)
else
h = 203+math.floor(test*3+0.5)
end
for y=minp.y, maxp.y, 1 do
p_addpos = area:index(x, y, z)
if y <= h then
data[p_addpos] = c_netherrack
elseif y <= 201 then
data[p_addpos] = c_lava
end
end
end
end
vm:set_data(data)
--vm:set_lighting({day=0, night=0})
vm:calc_lighting()
vm:update_liquids()
vm:write_to_map()
end)
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
-- 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
-- Notice I did not put a -1 for the beginning. This is because we don't want the throne to float
for y=HADES_THRONE_STARTPOS_ABS.y, (HADES_THRONE_ENDPOS_ABS.y + 1), 1 do
addpos = {x=x, y=y, z=z}
minetest.add_node(addpos, {name="air"})
end
end
end
-- Pass 4: Throne of Hades
for i,v in ipairs(HADES_THRONE_ABS) do
if v.portalblock == true then
NETHER_PORTALS_FROM_NETHER[table.getn(NETHER_PORTALS_FROM_NETHER)+1] = v.pos
nether:save_portal_from_nether(v.pos)
nether:createportal(v.pos)
else
minetest.add_node(v.pos, {name=v.block})
end
end
nether:touch(HADES_THRONE_GENERATED)
end
--[[ Create a nether tree
function nether:grow_nethertree(pos)
--TRUNK
pos.y=pos.y+1
local trunkpos={x=pos.x, z=pos.z}
for y=pos.y, pos.y+4+math.random(2) do
trunkpos.y=y
minetest.add_node(trunkpos, {name="nether:tree"})
end
--LEAVES
local leafpos={}
for x=(trunkpos.x-NETHER_TREESIZE), (trunkpos.x+NETHER_TREESIZE), 1 do
for y=(trunkpos.y-NETHER_TREESIZE), (trunkpos.y+NETHER_TREESIZE), 1 do
for z=(trunkpos.z-NETHER_TREESIZE), (trunkpos.z+NETHER_TREESIZE), 1 do
if (x-trunkpos.x)*(x-trunkpos.x)
+(y-trunkpos.y)*(y-trunkpos.y)
+(z-trunkpos.z)*(z-trunkpos.z)
<= NETHER_TREESIZE*NETHER_TREESIZE + NETHER_TREESIZE then
leafpos={x=x, y=y, z=z}
if minetest.get_node(leafpos).name=="air" then
if math.random(NETHER_APPLE_FREQ) == 1 then
if math.random(NETHER_HEAL_APPLE_FREQ) == 1 then
minetest.add_node(leafpos, {name="default:apple"})
else
minetest.add_node(leafpos, {name="nether:apple"})
end
else
minetest.add_node(leafpos, {name="nether:leaves"})
end
end
end
end
end
end
end]]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

View File

@ -1,166 +0,0 @@
-- Floor 1
{pos={x=0,y=0,z=0}, block="nether:netherrack"},
{pos={x=0,y=0,z=1}, block="nether:netherrack"},
{pos={x=0,y=0,z=2}, block="nether:netherrack"},
{pos={x=0,y=0,z=3}, block="nether:netherrack"},
{pos={x=0,y=0,z=4}, block="nether:netherrack"},
{pos={x=0,y=0,z=5}, block="nether:netherrack"},
{pos={x=1,y=0,z=5}, block="nether:netherrack"},
{pos={x=2,y=0,z=5}, block="nether:netherrack"},
{pos={x=3,y=0,z=5}, block="nether:netherrack"},
{pos={x=4,y=0,z=5}, block="nether:netherrack"},
{pos={x=5,y=0,z=5}, block="nether:netherrack"},
{pos={x=0,y=0,z=6}, block="nether:netherrack"},
{pos={x=1,y=0,z=6}, block="nether:netherrack"},
{pos={x=2,y=0,z=6}, block="nether:netherrack"},
{pos={x=3,y=0,z=6}, block="nether:netherrack"},
{pos={x=4,y=0,z=6}, block="nether:netherrack"},
{pos={x=5,y=0,z=6}, block="nether:netherrack"},
{pos={x=5,y=0,z=4}, block="nether:netherrack"},
{pos={x=5,y=0,z=3}, block="nether:netherrack"},
{pos={x=5,y=0,z=2}, block="nether:netherrack"},
{pos={x=5,y=0,z=1}, block="nether:netherrack"},
{pos={x=5,y=0,z=0}, block="nether:netherrack"},
{pos={x=4,y=0,z=0}, block="nether:netherrack"},
{pos={x=3,y=0,z=0}, block="nether:netherrack"},
{pos={x=2,y=0,z=0}, block="nether:netherrack"},
{pos={x=1,y=0,z=0}, block="nether:netherrack"},
-- Floor 2
{pos={x=0,y=1,z=0}, block="nether:netherrack"},
{pos={x=0,y=1,z=1}, block="nether:netherrack"},
{pos={x=0,y=1,z=2}, block="nether:netherrack"},
{pos={x=0,y=1,z=3}, block="nether:netherrack"},
{pos={x=0,y=1,z=4}, block="nether:netherrack"},
{pos={x=0,y=1,z=5}, block="nether:netherrack"},
{pos={x=1,y=1,z=5}, block="nether:netherrack"},
{pos={x=2,y=1,z=5}, block="nether:netherrack"},
{pos={x=3,y=1,z=5}, block="nether:netherrack"},
{pos={x=4,y=1,z=5}, block="nether:netherrack"},
{pos={x=5,y=1,z=5}, block="nether:netherrack"},
{pos={x=0,y=1,z=6}, block="nether:netherrack"},
{pos={x=1,y=1,z=6}, block="nether:netherrack"},
{pos={x=2,y=1,z=6}, block="nether:netherrack"},
{pos={x=3,y=1,z=6}, block="nether:netherrack"},
{pos={x=4,y=1,z=6}, block="nether:netherrack"},
{pos={x=5,y=1,z=6}, block="nether:netherrack"},
{pos={x=5,y=1,z=4}, block="nether:netherrack"},
{pos={x=5,y=1,z=3}, block="nether:netherrack"},
{pos={x=5,y=1,z=2}, block="nether:netherrack"},
{pos={x=5,y=1,z=1}, block="nether:netherrack"},
{pos={x=5,y=1,z=0}, block="nether:netherrack"},
{pos={x=4,y=1,z=0}, block="nether:netherrack"},
{pos={x=3,y=1,z=1}, block="nether:netherrack"},
{pos={x=2,y=1,z=1}, block="nether:netherrack"},
{pos={x=1,y=1,z=0}, block="nether:netherrack"},
{pos={x=1,y=1,z=1}, block="nether:netherrack"},
{pos={x=4,y=1,z=1}, block="nether:netherrack"},
-- Floor 3
{pos={x=0,y=2,z=0}, block="nether:netherrack"},
{pos={x=0,y=2,z=1}, block="nether:netherrack"},
{pos={x=0,y=2,z=2}, block="nether:netherrack"},
{pos={x=0,y=2,z=3}, block="nether:netherrack"},
{pos={x=0,y=2,z=4}, block="nether:netherrack"},
{pos={x=0,y=2,z=5}, block="nether:netherrack"},
{pos={x=1,y=2,z=5}, block="nether:netherrack"},
{pos={x=2,y=2,z=5}, block="nether:netherrack"},
{pos={x=3,y=2,z=5}, block="nether:netherrack"},
{pos={x=4,y=2,z=5}, block="nether:netherrack"},
{pos={x=5,y=2,z=5}, block="nether:netherrack"},
{pos={x=0,y=2,z=6}, block="nether:netherrack"},
{pos={x=1,y=2,z=6}, block="nether:netherrack"},
{pos={x=2,y=2,z=6}, block="nether:netherrack"},
{pos={x=3,y=2,z=6}, block="nether:netherrack"},
{pos={x=4,y=2,z=6}, block="nether:netherrack"},
{pos={x=5,y=2,z=6}, block="nether:netherrack"},
{pos={x=5,y=2,z=4}, block="nether:netherrack"},
{pos={x=5,y=2,z=3}, block="nether:netherrack"},
{pos={x=5,y=2,z=2}, block="nether:netherrack"},
{pos={x=5,y=2,z=1}, block="nether:netherrack"},
{pos={x=5,y=2,z=0}, block="nether:netherrack"},
{pos={x=4,y=2,z=0}, block="nether:netherrack"},
{pos={x=3,y=2,z=2}, block="nether:netherrack"},
{pos={x=2,y=2,z=2}, block="nether:netherrack"},
{pos={x=1,y=2,z=0}, block="nether:netherrack"},
{pos={x=1,y=2,z=1}, block="nether:netherrack"},
{pos={x=4,y=2,z=1}, block="nether:netherrack"},
{pos={x=1,y=2,z=2}, block="nether:netherrack"},
{pos={x=4,y=2,z=2}, block="nether:netherrack"},
-- Floor 4
{pos={x=0,y=3,z=0}, block="nether:netherrack"},
{pos={x=0,y=3,z=1}, block="nether:netherrack"},
{pos={x=0,y=3,z=2}, block="nether:netherrack"},
{pos={x=0,y=3,z=3}, block="nether:netherrack"},
{pos={x=0,y=3,z=4}, block="nether:netherrack"},
{pos={x=0,y=3,z=5}, block="nether:netherrack"},
{pos={x=1,y=3,z=5}, block="nether:netherrack"},
{pos={x=2,y=3,z=5}, block="nether:netherrack"},
{pos={x=3,y=3,z=5}, block="nether:netherrack"},
{pos={x=4,y=3,z=5}, block="nether:netherrack"},
{pos={x=5,y=3,z=5}, block="nether:netherrack"},
{pos={x=0,y=3,z=6}, block="nether:netherrack"},
{pos={x=1,y=3,z=6}, block="nether:netherrack"},
{pos={x=2,y=3,z=6}, block="nether:netherrack"},
{pos={x=3,y=3,z=6}, block="nether:netherrack"},
{pos={x=4,y=3,z=6}, block="nether:netherrack"},
{pos={x=5,y=3,z=6}, block="nether:netherrack"},
{pos={x=5,y=3,z=4}, block="nether:netherrack"},
{pos={x=5,y=3,z=3}, block="nether:netherrack"},
{pos={x=5,y=3,z=2}, block="nether:netherrack"},
{pos={x=5,y=3,z=1}, block="nether:netherrack"},
{pos={x=5,y=3,z=0}, block="nether:netherrack"},
{pos={x=4,y=3,z=0}, block="nether:netherrack"},
{pos={x=3,y=3,z=3}, block="nether:netherrack"},
{pos={x=2,y=3,z=3}, block="nether:netherrack"},
{pos={x=1,y=3,z=0}, block="nether:netherrack"},
{pos={x=1,y=3,z=1}, block="nether:netherrack"},
{pos={x=4,y=3,z=1}, block="nether:netherrack"},
{pos={x=1,y=3,z=2}, block="nether:netherrack"},
{pos={x=4,y=3,z=2}, block="nether:netherrack"},
{pos={x=1,y=3,z=3}, block="nether:netherrack"},
{pos={x=4,y=3,z=3}, block="nether:netherrack"},
{pos={x=1,y=3,z=4}, block="nether:netherrack"},
{pos={x=4,y=3,z=4}, block="nether:netherrack"},
{pos={x=2,y=3,z=4}, block="nether:netherrack"},
{pos={x=2,y=3,z=5}, block="nether:netherrack"},
{pos={x=3,y=3,z=4}, block="nether:netherrack"},
{pos={x=3,y=3,z=5}, block="nether:netherrack"},
-- Floor 5
{pos={x=2,y=4,z=4}, block="nether:netherrack"},
{pos={x=2,y=4,z=5}, block="nether:netherrack"},
{pos={x=3,y=4,z=4}, block="nether:netherrack"},
{pos={x=3,y=4,z=5}, block="nether:netherrack"},
{pos={x=2,y=4,z=6}, block="nether:netherrack"},
{pos={x=3,y=4,z=6}, block="nether:netherrack"},
-- Torches on floor 5
{pos={x=0,y=4,z=4}, block="nether:nether_torch_bottom"},
{pos={x=1,y=4,z=4}, block="nether:nether_torch_bottom"},
{pos={x=0,y=4,z=5}, block="nether:nether_torch_bottom"},
{pos={x=1,y=4,z=5}, block="nether:nether_torch_bottom"},
{pos={x=4,y=4,z=4}, block="nether:nether_torch_bottom"},
{pos={x=5,y=4,z=4}, block="nether:nether_torch_bottom"},
{pos={x=4,y=4,z=5}, block="nether:nether_torch_bottom"},
{pos={x=5,y=4,z=5}, block="nether:nether_torch_bottom"},
{pos={x=0,y=4,z=0}, block="nether:nether_torch_bottom"},
{pos={x=1,y=4,z=0}, block="nether:nether_torch_bottom"},
{pos={x=0,y=4,z=1}, block="nether:nether_torch_bottom"},
{pos={x=1,y=4,z=1}, block="nether:nether_torch_bottom"},
{pos={x=4,y=4,z=0}, block="nether:nether_torch_bottom"},
{pos={x=5,y=4,z=0}, block="nether:nether_torch_bottom"},
{pos={x=4,y=4,z=1}, block="nether:nether_torch_bottom"},
{pos={x=5,y=4,z=1}, block="nether:nether_torch_bottom"},
{pos={x=0,y=4,z=2}, block="nether:nether_torch_bottom"},
{pos={x=1,y=4,z=2}, block="nether:nether_torch_bottom"},
{pos={x=0,y=4,z=3}, block="nether:nether_torch_bottom"},
{pos={x=1,y=4,z=3}, block="nether:nether_torch_bottom"},
{pos={x=4,y=4,z=2}, block="nether:nether_torch_bottom"},
{pos={x=5,y=4,z=2}, block="nether:nether_torch_bottom"},
{pos={x=4,y=4,z=3}, block="nether:nether_torch_bottom"},
{pos={x=5,y=4,z=3}, block="nether:nether_torch_bottom"},
{pos={x=4,y=4,z=6}, block="nether:nether_torch_bottom"},
{pos={x=5,y=4,z=6}, block="nether:nether_torch_bottom"},
-- Floor 6
{pos={x=2,y=5,z=6}, block="nether:netherrack"},
{pos={x=3,y=5,z=6}, block="nether:netherrack"},
-- Floor 7
{pos={x=2,y=6,z=6}, block="nether:netherrack"},
{pos={x=3,y=6,z=6}, block="nether:netherrack"},

2
nether/crafting.lua Normal file → Executable file
View File

@ -214,7 +214,7 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "default:coal", output = "default:coal_lump",
recipe = "nether:tree", recipe = "nether:tree",
}) })

1
nether/depends.txt Normal file → Executable file
View File

@ -2,5 +2,6 @@ default
glow glow
riesenpilz riesenpilz
stairs stairs
vector_extras
fence_registration? fence_registration?
watershed? watershed?

14
nether/furnace.lua Normal file → Executable file
View File

@ -250,7 +250,7 @@ minetest.register_abm({
if last_time == current_time then if last_time == current_time then
return return
end end
local timediff = get_timediff(last_time, current_time)+meta:get_string("timedif") local timediff = get_timediff(last_time, current_time)+meta:get_string("timedif")
local times = math.floor(timediff) local times = math.floor(timediff)
meta:set_string("last_active", current_time) meta:set_string("last_active", current_time)
@ -272,13 +272,13 @@ minetest.register_abm({
local srclist = inv:get_list("src") local srclist = inv:get_list("src")
local cooked = nil local cooked = nil
local aftercooked local aftercooked
if srclist then if srclist then
cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
end end
local was_active = false local was_active = false
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
was_active = true was_active = true
meta:set_float("fuel_time", meta:get_float("fuel_time") + 1) meta:set_float("fuel_time", meta:get_float("fuel_time") + 1)
@ -298,7 +298,7 @@ minetest.register_abm({
meta:set_string("src_time", 0) meta:set_string("src_time", 0)
end end
end end
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
local percent = math.floor(meta:get_float("fuel_time") / local percent = math.floor(meta:get_float("fuel_time") /
meta:get_float("fuel_totaltime") * 100) meta:get_float("fuel_totaltime") * 100)
@ -313,7 +313,7 @@ minetest.register_abm({
local cooked = nil local cooked = nil
local fuellist = inv:get_list("fuel") local fuellist = inv:get_list("fuel")
local srclist = inv:get_list("src") local srclist = inv:get_list("src")
if srclist then if srclist then
cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist})
end end
@ -339,7 +339,7 @@ minetest.register_abm({
meta:set_string("fuel_totaltime", fuel.time) meta:set_string("fuel_totaltime", fuel.time)
meta:set_string("fuel_time", 0) meta:set_string("fuel_time", 0)
inv:set_stack("fuel", 1, afterfuel.items[1]) inv:set_stack("fuel", 1, afterfuel.items[1])
end end
end, end,

238
nether/guide.lua Normal file → Executable file
View File

@ -3,15 +3,15 @@ local cube = minetest.inventorycube
-- the content of the guide -- the content of the guide
local guide_infos = { local guide_infos = {
{ {
description = "mushroom", description = "Mushrooms",
{"text", "You can find the nether mushroom on the ground of the nether and on netherrack soil, it can be dug by hand."}, {"text", "Nether mushrooms can be found on the nether's ground and\n"..
{"y", -0.3}, "on netherrack soil, it can be dug by hand."},
{"image", {1, 1, "riesenpilz_nether_shroom_side.png"}}, {"image", {1, 1, "riesenpilz_nether_shroom_side.png"}},
{"y", 0.2}, {"y", 0.2},
{"text", "If you drop it without holding aux1 (the fast key), you can split it into its stem and head:"}, {"text", "If you drop it without holding the fast key, you can split it into its stem and head:"},
{"image", {1, 1, "nether_shroom_top.png", 1}}, {"image", {1, 1, "nether_shroom_top.png", 1}},
{"image", {1, 1, "nether_shroom_stem.png"}}, {"image", {1, 1, "nether_shroom_stem.png"}},
{"y", 0.2}, {"y", 0.1},
{"text", "You can get more mushrooms by using a netherrack soil:\n".. {"text", "You can get more mushrooms by using a netherrack soil:\n"..
"1. search a dark place and, if necessary, place netherrack with air about it\n".. "1. search a dark place and, if necessary, place netherrack with air about it\n"..
"2. right click with cooked blood onto the netherrack to make it soiled\n".. "2. right click with cooked blood onto the netherrack to make it soiled\n"..
@ -27,81 +27,89 @@ local guide_infos = {
{"image", {1, 1, "nether_netherrack.png"}}, {"image", {1, 1, "nether_netherrack.png"}},
}, },
{ {
description = "tools", description = "Tools",
{"text", "You can craft 5 types of tools in the nether, which (except the mushroom pick) require sticks to be crafted:"}, {"text", "You can craft 5 kinds of tools in the nether,\n"..
{"y", 0.4}, "which (except the mushroom pick) require sticks to be crafted:"},
{"image", {1, 1, "nether_pick_mushroom.png"}}, {"image", {1, 1, "nether_pick_mushroom.png"}},
{"text", "strength: 1\n".. {"y", 0.1},
{"text", "strength : 1\n"..
"The mushroom pick needs mushroom stems and heads to be crafted."}, "The mushroom pick needs mushroom stems and heads to be crafted."},
{"y", 0.2},
{"image", {1, 1, "nether_pick_wood.png"}}, {"image", {1, 1, "nether_pick_wood.png"}},
{"text", "strength: 2\n".. {"y", 0.1},
{"text", "strength : 2\n"..
"The nether wood pick can be crafted with cooked nether blood wood."}, "The nether wood pick can be crafted with cooked nether blood wood."},
{"y", 0.2}, {"image", {1, 1, "nether_axe_netherrack.png", 1.5}},
{"image", {1, 1, "nether_axe_netherrack.png", 1}}, {"image", {1, 1, "nether_shovel_netherrack.png", 3}},
{"image", {1, 1, "nether_shovel_netherrack.png", 2}}, {"image", {1, 1, "nether_sword_netherrack.png", 4.5}},
{"image", {1, 1, "nether_sword_netherrack.png", 3}},
{"image", {1, 1, "nether_pick_netherrack.png"}}, {"image", {1, 1, "nether_pick_netherrack.png"}},
{"text", "strength: 3\n".. {"y", 0.1},
{"text", "strength : 3\n"..
"The red netherrack tools can be crafted with usual netherrack."}, "The red netherrack tools can be crafted with usual netherrack."},
{"y", 0.2}, {"image", {1, 1, "nether_axe_netherrack_blue.png", 1.5}},
{"image", {1, 1, "nether_axe_netherrack_blue.png", 1}}, {"image", {1, 1, "nether_shovel_netherrack_blue.png", 3}},
{"image", {1, 1, "nether_shovel_netherrack_blue.png", 2}}, {"image", {1, 1, "nether_sword_netherrack_blue.png", 4.5}},
{"image", {1, 1, "nether_sword_netherrack_blue.png", 3}},
{"image", {1, 1, "nether_pick_netherrack_blue.png"}}, {"image", {1, 1, "nether_pick_netherrack_blue.png"}},
{"text", "strength: 3\n".. {"y", 0.1},
{"text", "strength : 3\n"..
"The blue netherrack tools can be crafted with blue netherrack."}, "The blue netherrack tools can be crafted with blue netherrack."},
{"y", 0.2}, {"image", {1, 1, "nether_axe_white.png", 1.5}},
{"image", {1, 1, "nether_axe_white.png", 1}}, {"image", {1, 1, "nether_shovel_white.png", 3}},
{"image", {1, 1, "nether_shovel_white.png", 2}}, {"image", {1, 1, "nether_sword_white.png", 4.5}},
{"image", {1, 1, "nether_sword_white.png", 3}},
{"image", {1, 1, "nether_pick_white.png"}}, {"image", {1, 1, "nether_pick_white.png"}},
{"text", "strength: 3\n".. {"y", 0.1},
{"text", "strength : 3\n"..
"The siwtonic tools can be crafted with the siwtonic ore."}, "The siwtonic tools can be crafted with the siwtonic ore."},
}, },
{ {
description = "blood structures", description = "Blood structures",
{"text", "You can find blood structures on the ground and dig their nodes even with the bare hand."}, {"text", "You can find blood structures on the ground and\n"..
{"y", 0.2}, "dig their nodes even with the bare hand."},
{"text", "One contains 4 kinds of blocks:"}, {"y", 0.5},
{"text", "One contains 4 kinds of blocks :"},
{"image", {1, 1, cube("nether_blood.png"), 1}}, {"image", {1, 1, cube("nether_blood.png"), 1}},
{"image", {1, 1, {"image", {1, 1,
cube("nether_blood_top.png", "nether_blood.png^nether_blood_side.png", "nether_blood.png^nether_blood_side.png"), cube("nether_blood_top.png", "nether_blood.png^nether_blood_side.png", "nether_blood.png^nether_blood_side.png"),
2}}, 2}},
{"image", {1, 1, "nether_fruit.png", 3}}, {"image", {1, 1, "nether_fruit.png", 3}},
{"image", {1, 1, cube("nether_blood_stem_top.png", "nether_blood_stem.png", "nether_blood_stem.png")}}, {"image", {1, 1, cube("nether_blood_stem_top.png", "nether_blood_stem.png", "nether_blood_stem.png")}},
{"text", "the blood stem, blood, blood head and nether fruit"}, {"y", 0.1},
{"y", 0.2}, {"text", "Blood stem, blood, blood head and nether fruit"},
{"text", "You can craft the stem to 4 blood wood:"}, {"y", 0.1},
{"text", "You can craft 4 blood wood with the stem :"},
{"image", {1, 1, cube("nether_wood.png")}}, {"image", {1, 1, cube("nether_wood.png")}},
{"y", 0.2}, {"y", 0.1},
{"text", "The 4 blood nodes can be cooked and, except blood wood, their blood can be extracted."}, {"text", "The 4 blood nodes can be cooked and, except\n"..
"blood wood, their blood can be extracted."},
}, },
{ {
description = "fruit", description = "Fruits",
{"text", "You can find the nether fruit at blood structures and dig it even with the bare hand."}, {"text", "You can find the nether fruits on blood structures\n"..
{"y", 0.05}, "and dig them even with the bare hand."},
{"image", {1, 1, "nether_fruit.png"}}, {"image", {1, 1, "nether_fruit.png"}},
{"text", "You can eat it to get a bit blood because of its acid effect:"}, {"text", "Eating it will make you lose life but\n"..
"it might feed you and give you blood :"},
{"image", {1, 1, "nether_blood_extracted.png"}}, {"image", {1, 1, "nether_blood_extracted.png"}},
{"y", 0.2}, {"y", 0.2},
{"text", "If you eat it at the right place inside a portal, you teleport instead of getting blood."}, {"text", "If you eat it at the right place inside a portal,\n"..
"you will teleport instead of getting blood."},
{"y", 0.2}, {"y", 0.2},
{"text", "If you drop it without holding aux1 (the fast key), you can split it into its fruit and leaf:"}, {"text", "If you drop it without holding the fast key,\n"..
"you can split it into its fruit and leaf:"},
{"image", {1, 1, "nether_fruit_leaf.png", 1}}, {"image", {1, 1, "nether_fruit_leaf.png", 1}},
{"image", {1, 1, "nether_fruit_no_leaf.png"}}, {"image", {1, 1, "nether_fruit_no_leaf.png"}},
{"y", 0.2}, {"y", 0.2},
{"text", "9 fruit leaves can be crafted to a fruit leaves block and the fruit without leaf can be used for crafting a nether pearl."}, {"text", "Craft a fruit leave block out of 9 fruit leaves\n"..
{"y", 0.2}, "The fruit can be used to craft a nether pearl."},
{"image", {1, 1, cube("nether_fruit_leaves.png")}}, {"image", {1, 1, cube("nether_fruit_leaves.png")}},
{"text", "fruit leaves block"}, {"y", 0.2},
{"text", "A fruit leaves block"},
}, },
{ {
description = "cooking", description = "Cooking",
{"text", "To get a furnace you need to dig at least 8 netherrack bricks.\n".. {"text", "To get a furnace you need to dig at least 8 netherrack bricks.\n"..
"They can be found at pyramid like constructions and require at least a strength 1 nether pick to be dug.\n".. "They can be found at pyramid like constructions and require at least\n"..
"For crafting the furnace, use the netherrack bricks like cobble:"}, "a strength 1 nether pick to be dug.\n"..
{"y", 0.2}, "To craft the furnace, use the netherrack bricks like cobble:"},
{"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 0.5}}, {"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 0.5}},
{"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}}, {"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}},
{"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}}, {"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}},
@ -113,29 +121,27 @@ local guide_infos = {
{"y", 0.2}, {"y", 0.2},
{"text", "To begin cooking stuff, you can use a mushroom or fruit.\n".. {"text", "To begin cooking stuff, you can use a mushroom or fruit.\n"..
"After that it's recommended to use cooked blood nodes."}, "After that it's recommended to use cooked blood nodes."},
{"y", 0.2},
{"text", "Some nether items can be cooked:"},
{"y", 0.1}, {"y", 0.1},
{"text", "Some nether items can be cooked:"},
{"image", {1, 1, cube("nether_blood_stem_top_cooked.png", "nether_blood_stem_cooked.png", "nether_blood_stem_cooked.png"), 0.35}}, {"image", {1, 1, cube("nether_blood_stem_top_cooked.png", "nether_blood_stem_cooked.png", "nether_blood_stem_cooked.png"), 0.35}},
{"image", {1, 1, cube("nether_blood_cooked.png"), 1.6}}, {"image", {1, 1, cube("nether_blood_cooked.png"), 1.6}},
{"image", {1, 1, {"image", {1, 1,
cube("nether_blood_top_cooked.png", "nether_blood_cooked.png^nether_blood_side_cooked.png", "nether_blood_cooked.png^nether_blood_side_cooked.png"), cube("nether_blood_top_cooked.png", "nether_blood_cooked.png^nether_blood_side_cooked.png", "nether_blood_cooked.png^nether_blood_side_cooked.png"),
2.9}}, 2.9}},
{"image", {1, 1, cube("nether_wood_cooked.png"), 4.3}}, {"image", {1, 1, cube("nether_wood_cooked.png"), 4.3}},
{"y", 1}, {"y", 1.2},
{"text", "cooked blood stem, cooked blood, cooked blood head, cooked blood wood,"}, {"text", "Some cooked blood stem, cooked blood,\n"..
{"y", 0.2}, "cooked blood head and cooked blood wood,"},
{"image", {1, 1, "nether_hotbed.png", 0.3}}, {"image", {1, 1, "nether_hotbed.png", 0.3}},
{"image", {1, 1, "nether_pearl.png", 2}}, {"image", {1, 1, "nether_pearl.png", 2}},
{"y", 1}, {"y", 1.2},
{"text", "cooked extracted blood and nether pearl"}, {"text", "Some cooked extracted blood and a nether pearl"},
}, },
{ {
description = "extractor", description = "Extractors",
{"text", "Here you can find out information about the nether extractor."}, {"text", "Here you can find out information about the nether extractor."},
{"y", 0.4},
{"text", "Here you can see its craft recipe:"},
{"y", 0.2}, {"y", 0.2},
{"text", "Here you can see its craft recipe:"},
{"image", {0.5, 0.5, cube("nether_blood_top_cooked.png", "nether_blood_cooked.png^nether_blood_side_cooked.png", "nether_blood_cooked.png^nether_blood_side_cooked.png"), 0.5}}, {"image", {0.5, 0.5, cube("nether_blood_top_cooked.png", "nether_blood_cooked.png^nether_blood_side_cooked.png", "nether_blood_cooked.png^nether_blood_side_cooked.png"), 0.5}},
{"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}}, {"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}},
{"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}}, {"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}},
@ -147,7 +153,7 @@ local guide_infos = {
{"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}}, {"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}},
{"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}}, {"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}},
{"y", 0.2}, {"y", 0.2},
{"text", "You can extract blood from the blood nodes you get from the blood structure.\n".. {"text", "Extract blood from the blood nodes you get from the blood structures.\n"..
"You can also get blood with a nether fruit."}, "You can also get blood with a nether fruit."},
{"y", 0.2}, {"y", 0.2},
{"text", "So you can use it:\n".. {"text", "So you can use it:\n"..
@ -169,69 +175,76 @@ local guide_infos = {
{"image", {1, 1, "nether_blood.png", 0.82, -0.12}}, {"image", {1, 1, "nether_blood.png", 0.82, -0.12}},
{"image", {1, 1, "nether_blood_empty.png", 3.82, -0.12}}, {"image", {1, 1, "nether_blood_empty.png", 3.82, -0.12}},
{"y", 1.2}, {"y", 1.2},
{"text", "The empty blood stem can be crafted to empty nether wood, which can be crafted to nether sticks."}, {"text", "The empty blood stem can be crafted into empty nether wood,\n"..
"which can be crafted into nether sticks."},
}, },
{ {
description = "ores", description = "Ores",
{"text", "You can find 5 types of ores:"}, {"text", "You can find 5 types of ores:"},
{"y", 0.4},
{"image", {1, 1, cube("nether_netherrack_black.png"), 4}}, {"image", {1, 1, cube("nether_netherrack_black.png"), 4}},
{"image", {1, 1, cube("nether_netherrack.png")}}, {"image", {1, 1, cube("nether_netherrack.png")}},
{"text", "The red netherrack is generated like stone and the black netherrack is generated like gravel.\n"..
"Both require at least a strength 2 nether pick to be dug."},
{"y", 0.2}, {"y", 0.2},
{"text", "The red netherrack is generated like stone.\n"..
"The black netherrack is generated like gravel.\n"..
"Both require at least a strength 2 nether pick to be dug."},
{"image", {1, 1, cube("nether_white.png"), 4}}, {"image", {1, 1, cube("nether_white.png"), 4}},
{"image", {1, 1, cube("nether_netherrack_blue.png")}}, {"image", {1, 1, cube("nether_netherrack_blue.png")}},
{"text", "The blue netherrack is generated like diamond ore and the siwtonic ore is generated like mese blocks.\n"..
"Both require at least a strength 3 nether pick to be dug."},
{"y", 0.2}, {"y", 0.2},
{"text", "The blue netherrack is generated like diamond ore.\n"..
"The siwtonic ore is generated like mese blocks.\n"..
"Both require at least a strength 3 nether pick to be dug."},
{"image", {1, 1, cube("nether_netherrack_tiled.png"), 4}}, {"image", {1, 1, cube("nether_netherrack_tiled.png"), 4}},
{"image", {1, 1, cube("glow_stone.png")}}, {"image", {1, 1, cube("glow_stone.png")}},
{"text", "The glow stone can be used for lighting and the tiled netherrack is generated like coal ore.\n".. {"y", 0.2},
{"text", "Glow stone can be used for lighting.\n"..
"Tiled netherrack is generated like coal ore.\n"..
"Glow stone requires at least a strength 1 pick to be dug.\n".. "Glow stone requires at least a strength 1 pick to be dug.\n"..
"Tiled netherrack requires at least a strength 2 nether pick to be dug."}, "Dig tiled netherrack with at least a level 2 pickaxe."},
}, },
{ {
description = "vines", description = "Vines",
{"text", "The nether vines can be fed with blood.\n".. {"text", "Feed nether vines with blood.\n"..
"They can be dug by hand and drop nether children."}, "Dig them with anything."},
{"image", {1, 1, "nether_vine.png"}}, {"image", {1, 1, "nether_vine.png"}},
{"y", 0.2}, {"y", 0.2},
{"text", "To let a nether child grow to a blood structure, place it at a dark place onto a blood structure head node."}, {"text", "Grow nether child by placing\n"..
"placing it to a dark place onto a\n"..
"blood structure head node."},
{"image", {1, 1, "nether_sapling.png"}}, {"image", {1, 1, "nether_sapling.png"}},
{"y", -0.11}, {"y", -0.10},
{"image", {1, 1, "nether_blood.png^nether_blood_side.png"}}, {"image", {1, 1, "nether_blood.png^nether_blood_side.png"}},
}, },
{ {
description = "pearl", description = "Pearls",
{"text", "The nether pearl can be thrown for teleporting.\n".. {"text", "The nether pearl can be used to teleport by throwing it.\n"..
"So cou can get one:"}, "Here is how to get one :"},
{"y", 0.4}, {"y", 0.2},
{"text", "At first you need to craft 2 mushroom heads and 1 nether fruit without leaf together:"}, {"text", "First of all craft 2 mushroom heads and 1 nether fruit\n"..
"without leaf together :"},
{"image", {1, 1, "nether_shroom_top.png"}}, {"image", {1, 1, "nether_shroom_top.png"}},
{"image", {1, 1, "nether_fim.png", 3}}, {"image", {1, 1, "nether_fim.png", 3}},
{"image", {1, 1, "nether_fruit_no_leaf.png"}}, {"image", {1, 1, "nether_fruit_no_leaf.png"}},
{"image", {1, 1, "nether_shroom_top.png"}}, {"image", {1, 1, "nether_shroom_top.png"}},
{"y", 0.2}, {"y", 0.2},
{"text", "Then you need to put the result into the furnance to cook it to a nether pearl:"}, {"text", "Put the result into the furnace\n"..
"to cook it into a nether pearl :"},
{"image", {1, 1, "nether_pearl.png"}}, {"image", {1, 1, "nether_pearl.png"}},
}, },
{ {
description = "bricks", description = "Bricks",
{"text", "You can craft bricks of red, black and blue netherrack."}, {"text", "Craft bricks out of red,\n"..
{"y", 0.4}, "black and blue netherrack."},
{"image", {1, 1, cube("nether_netherrack_brick_black.png"), 1}}, {"image", {1, 1, cube("nether_netherrack_brick_black.png"), 1}},
{"image", {1, 1, cube("nether_netherrack_brick_blue.png"), 2}}, {"image", {1, 1, cube("nether_netherrack_brick_blue.png"), 2}},
{"image", {1, 1, cube("nether_netherrack_brick.png")}}, {"image", {1, 1, cube("nether_netherrack_brick.png")}},
{"y", 0.4},
{"text", "Dig them with at least a level 1 pickaxe."},
{"y", 0.2}, {"y", 0.2},
{"text", "These bricks require at least a strength 1 nether pick to be dug."},
{"y", 0.2},
{"text", "Because the crafing recipe of bricks is well known, it's not shown here."},
}, },
{ {
description = "portal", description = "Portals",
{"text", "Here you can find out how to built the nether portal."}, {"text", "Here you can find out how to built the nether portal."},
{"y", 0.4}, {"y", 0.3},
{"text", "A nether portal requires following nodes:"}, {"text", "A nether portal requires following nodes:"},
{"y", 0.05}, {"y", 0.05},
{"text", "21 empty nether wooden planks\n".. {"text", "21 empty nether wooden planks\n"..
@ -245,48 +258,49 @@ local guide_infos = {
{"text", "It should look approximately like this one:"}, {"text", "It should look approximately like this one:"},
{"image", {5.625, 6, "nether_teleporter.png", 0, -1.5}}, {"image", {5.625, 6, "nether_teleporter.png", 0, -1.5}},
{"y", 5.5}, {"y", 5.5},
{"text", "You can activate it by standing in the middle on a siwtonic block and eating a nether fruit.\n".. {"text", "Activate it by standing in the middle,\n"..
"Don't forget to take enough stuff with you to be able to build a portal back."}, "on the siwtonic block and eating a nether fruit.\n"..
"Take enough stuff with you to build a portal when you'll come back."},
}, },
{ {
description = "nether forest", description = "Forests",
{"text", "The nether forest is generated in caves above the usual nether."}, {"text", "The nether forest is generated in caves,\n"..
"above the usual nether."},
{"y", 0.2}, {"y", 0.2},
{"text", "There you can find some plants:"}, {"text", "There you can find some plants:"},
{"y", 0.2},
{"image", {1, 1, "nether_grass_middle.png", 1}}, {"image", {1, 1, "nether_grass_middle.png", 1}},
{"image", {1, 1, "nether_grass_big.png", 2}}, {"image", {1, 1, "nether_grass_big.png", 2}},
{"image", {1, 1, "nether_grass_small.png"}}, {"image", {1, 1, "nether_grass_small.png"}},
{"y", 0.2}, {"y", 0.2},
{"text", "The nether forest grass can be used to get paper.\n".. {"text", "Use the nether forest grass to get paper.\n"..
"Just dig it, put the grass into the furnace and craft paper out of the dried grass.\n".. "Craft paper out of the dried grass."},
"The recipe is similar to the one of crafting paper with papyrus."},
{"y", 0.2},
{"image", {1, 1, cube("nether_tree_top.png", "nether_tree.png", "nether_tree.png")}}, {"image", {1, 1, cube("nether_tree_top.png", "nether_tree.png", "nether_tree.png")}},
{"text", "Nether trunks can be found at nether trees, you can craft nether wood out of them."},
{"y", 0.2}, {"y", 0.2},
{"text", "Nether trunks can be found at nether trees.\n"..
"Craft nether wood out of nether trunk."},
{"image", {1, 1, "nether_glowflower.png"}}, {"image", {1, 1, "nether_glowflower.png"}},
{"text", "Currently this flower can be used for lighting and decoration."}, {"y", 0.2},
{"text", "Use it for lighting and decoration."},
}, },
} }
-- the size of guide pages -- the size of guide pages
local guide_size = {x=15, y=10, cx=0.1, cy=-0.2} local guide_size = {x=40, y=10, cx=0.2, cy=0.2}
-- informations about settings and ... -- informations about settings and ...
local formspec_offset = {x=0.25, y=0.55} local formspec_offset = {x=0.25, y=0.50}
local font_size local font_size
if minetest.is_singleplayer() then if minetest.is_singleplayer() then
font_size = tonumber(minetest.setting_get("font_size")) or 13 font_size = tonumber(minetest.setting_get("font_size")) or 13
else else
font_size = 13 font_size = 13
end end
guide_size.fx = math.floor((guide_size.x-2*(guide_size.cx+formspec_offset.x))*font_size) guide_size.fx = math.floor((40*(guide_size.cx+formspec_offset.x))*font_size)
guide_size.fy = font_size/65 guide_size.fy = font_size/40
-- the default guide formspecs -- the default guide formspecs
local guide_forms = { local guide_forms = {
contents = "size[3,"..(#guide_infos+1)*0.5 ..";]label["..guide_size.cx+0.8 ..","..guide_size.cy..";Contents:]", contents = "size[3.6,"..(#guide_infos)-2 ..";]label["..guide_size.cx+0.7 ..","..guide_size.cy+0.2 ..";Contents:]",
} }
-- change the infos to formspecs -- change the infos to formspecs
@ -301,13 +315,13 @@ for n,data in ipairs(guide_infos) do
elseif typ == "x" then elseif typ == "x" then
x = math.max(x, content) x = math.max(x, content)
elseif typ == "text" then elseif typ == "text" then
local tab = minetest.splittext(content, guide_size.fx) --local tab = minetest.splittext(content, guide_size.fx)
local l = guide_size.cx local l = guide_size.cx
for _,str in ipairs(tab) do --[[for _,str in ipairs(tab) do
form = form.."label["..guide_size.cx..","..guide_size.cy+y..";"..str.."]" form = form.."label["..guide_size.cx ..","..guide_size.cy+y..";"..str.."]"
y = y+guide_size.fy y = y+guide_size.fy
l = math.max(l, #str) l = math.max(l, #str)
end end]]
x = math.max(x, l/font_size) x = math.max(x, l/font_size)
elseif typ == "image" then elseif typ == "image" then
local w, h, texture_name, px, py = unpack(content) local w, h, texture_name, px, py = unpack(content)
@ -323,7 +337,7 @@ for n,data in ipairs(guide_infos) do
end end
end end
end end
form = "size["..x..","..y+1 ..";]"..form.."button["..x/2-0.5 ..","..y ..";1,2;quit;back]" form = "size["..x*1.8 ..","..y+1 ..";]"..form.."button["..x/2-0.5 ..","..y ..";1,2;quit;Back]"
guide_forms[n] = {data.description, form} guide_forms[n] = {data.description, form}
end end
@ -336,8 +350,8 @@ end
local y = 0 local y = 0
for y,i in ipairs(guide_forms) do for y,i in ipairs(guide_forms) do
local desc, form = unpack(i) local desc, form = unpack(i)
local s = #desc*1.3/font_size+0.3 local s = #desc*1.3/font_size+1.5
guide_forms.contents = guide_forms.contents.."button["..guide_size.cx+math.random()..","..guide_size.cy+y/2 ..";"..s..",1;name;"..desc.."]" guide_forms.contents = guide_forms.contents.."button["..guide_size.cx*12/s-0.5 ..","..guide_size.cy+y/1.3 ..";"..s..",1;name;"..desc.."]"
end end
-- shows the contents of the formspec -- shows the contents of the formspec
@ -372,10 +386,10 @@ minetest.register_chatcommand("nether_help", {
minetest.chat_send_player(name, "Something went wrong.") minetest.chat_send_player(name, "Something went wrong.")
return false return false
end end
if player:getpos().y > nether.start then --[[ if player:getpos().y > nether.start then
minetest.chat_send_player(name, "Usually you don't neet this guide here. You can view it in the nether.") minetest.chat_send_player(name, "Usually you don't neet this guide here. You can view it in the nether.")
return false return false
end end --]]
minetest.chat_send_player(name, "Showing guide...") minetest.chat_send_player(name, "Showing guide...")
show_guide(name) show_guide(name)
return true return true

127
nether/init.lua Normal file → Executable file
View File

@ -55,6 +55,9 @@ local mushroom_rarity = 80
-- Frequency of trees in the nether forest (higher is less frequent) -- Frequency of trees in the nether forest (higher is less frequent)
local tree_rarity = 200 local tree_rarity = 200
local abm_tree_interval = 864
local abm_tree_chance = 100
-- height of the nether generation's end -- height of the nether generation's end
nether.start = f_h_max+100 nether.start = f_h_max+100
@ -100,7 +103,7 @@ if nether.info then
else else
info = "[nether] "..msg info = "[nether] "..msg
end end
print(info) minetest.log("action", info)
if self.inform_all then if self.inform_all then
minetest.chat_send_all(info) minetest.chat_send_all(info)
end end
@ -195,8 +198,9 @@ end
local function fix_light(minp, maxp) local function fix_light(minp, maxp)
local manip = minetest.get_voxel_manip() local manip = minetest.get_voxel_manip()
local emerged_pos1, emerged_pos2 = manip:read_from_map(minp, maxp) local emerged_pos1, emerged_pos2 = manip:read_from_map(minp, maxp)
area = VoxelArea:new({MinEdge=emerged_pos1, MaxEdge=emerged_pos2}) local area = VoxelArea:new({MinEdge=emerged_pos1, MaxEdge=emerged_pos2})
nodes = manip:get_data() local nodes = manip:get_data()
-- MODIFICATION MADE FOR MFF ^
manip:set_data(nodes) manip:set_data(nodes)
manip:write_to_map() manip:write_to_map()
@ -403,14 +407,14 @@ minetest.register_on_generated(function(minp, maxp, seed)
if forest_possible then if forest_possible then
perlin_f_bottom = minetest.get_perlin(11, 3, 0.8, tmp2) perlin_f_bottom = minetest.get_perlin(11, 3, 0.8, tmp2)
pmap_f_top = minetest.get_perlin_map(perlins.forest_top, map_lengths_xyz):get2dMap_flat({x=minp.x, y=minp.z}) pmap_f_top = minetest.get_perlin_map(perlins.forest_top, map_lengths_xyz):get2dMap_flat({x=minp.x, y=minp.z})
strassx = get_ws_list(2, minp.x) strassx = get_ws_list(2, minp.x, side_length)
strassz = get_ws_list(2, minp.z) strassz = get_ws_list(2, minp.z, side_length)
end end
local num2, tab2 local num2, tab2
if buildings >= 1 then if buildings >= 1 then
num2 = 1 num2 = 1
tab2 = nether_weird_noise({x=minp.x, y=nether.buildings-79, z=minp.z}, pymg, 200, 8, 10, 79) tab2 = nether_weird_noise({x=minp.x, y=nether.buildings-(maxp.y-minp.y), z=minp.z}, pymg, 200, 8, 10, maxp.y-minp.y)
end end
local count = 0 local count = 0
@ -689,6 +693,10 @@ function nether.grow_netherstructure(pos, generated)
end end
local set = vector.set_data_to_pos
local get = vector.get_data_from_pos
local remove = vector.remove_data_from_pos
local function soft_node(id) local function soft_node(id)
return id == c.air or id == c.ignore return id == c.air or id == c.ignore
end end
@ -698,7 +706,6 @@ local function update_minmax(min, max, p)
max.x = math.max(max.x, p.x) max.x = math.max(max.x, p.x)
min.z = math.min(min.z, p.z) min.z = math.min(min.z, p.z)
max.z = math.max(max.z, p.z) max.z = math.max(max.z, p.z)
return min, max
end end
local fruit_chances = {} local fruit_chances = {}
@ -769,18 +776,18 @@ function nether.grow_tree(pos, generated)
for j = 1,r do for j = 1,r do
local x = p.x+j*dir[1] local x = p.x+j*dir[1]
local z = p.z+j*dir[2] local z = p.z+j*dir[2]
trunks[x.." "..p.y.." "..z] = dir[3] set(trunks, z,p.y,x, dir[3])
end end
r = r+1 r = r+1
p.x = p.x+r*dir[1] p.x = p.x+r*dir[1]
p.z = p.z+r*dir[2] p.z = p.z+r*dir[2]
trunk_corners[p.x.." "..p.y.." "..p.z] = dir[4] or dir[3] set(trunk_corners, p.z,p.y,p.x, dir[4] or dir[3])
local h = math.random(h_arm_min, h_arm_max) local h = math.random(h_arm_min, h_arm_max)
for i = 1,h do for i = 1,h do
trunks[p.x.." "..p.y+i.." "..p.z] = true set(trunks, p.z,p.y+i,p.x, true)
end end
p.y = p.y+h p.y = p.y+h
--n = #todo+1 -- causes small trees --n = #todo+1 -- caused small trees
todo[#todo+1] = p todo[#todo+1] = p
end end
if p.y > pos.y+h_trunk_max then if p.y > pos.y+h_trunk_max then
@ -793,13 +800,17 @@ function nether.grow_tree(pos, generated)
local fruits = {} local fruits = {}
local trunk_ps = {} local trunk_ps = {}
local count = 0 local count = 0
for n,par in pairs(trunks) do local ps, trmin, trmax, trunk_count = vector.get_data_pos_table(trunks)
local p = {}
p.x, p.y, p.z = unpack(string.split(n, " ")) update_minmax(min, max, trmin)
if par ~= true then update_minmax(min, max, trmax)
p.par = par
for _,d in pairs(ps) do
if d[4] == true then
d[4] = nil
end end
table.insert(trunk_ps, p) trunk_ps[#trunk_ps+1] = d
local pz, py, px = unpack(d)
count = count+1 count = count+1
if count > leaf_thickness then if count > leaf_thickness then
count = 0 count = 0
@ -807,18 +818,21 @@ function nether.grow_tree(pos, generated)
local fruit_chance = fruit_chances[y] local fruit_chance = fruit_chances[y]
for z = -2,2 do for z = -2,2 do
for x = -2,2 do for x = -2,2 do
local dist = math.sqrt(x*x+y*y+z*z) local distq = x*x+y*y+z*z
if math.floor(dist) ~= 0 if distq ~= 0
and math.random(1, dist) == 1 then and math.random(1, math.sqrt(distq)) == 1 then
local pstr = p.x+x.." "..p.y+y.." "..p.z+z local x = x+px
if not trunks[pstr] then local y = y+py
if math.random(1, fruit_rarity) == 1 local z = z+pz
and fruit_chance if not get(trunks, z,y,x) then
if fruit_chance
and math.random(1, fruit_rarity) == 1
and math.random(1, fruit_chance) == 1 then and math.random(1, fruit_chance) == 1 then
fruits[pstr] = true set(fruits, z,y,x, true)
else else
leaves[pstr] = true set(leaves, z,y,x, true)
end end
update_minmax(min, max, {x=x, z=z})
end end
end end
end end
@ -827,37 +841,8 @@ function nether.grow_tree(pos, generated)
end end
end end
local leaf_ps = {}
for n,_ in pairs(leaves) do
local p = {}
p.x, p.y, p.z = unpack(string.split(n, " "))
table.insert(leaf_ps, p)
min, max = update_minmax(min, max, p)
end
for n,_ in pairs(trunks) do
local p = {}
p.x, _, p.z = unpack(string.split(n, " "))
min, max = update_minmax(min, max, p)
end
for i = -1,h_stem+1 do for i = -1,h_stem+1 do
table.insert(trunk_ps, {x=pos.x, y=pos.y+i, z=pos.z, par=0}) trunk_ps[#trunk_ps+1] = {pos.z, pos.y+i, pos.x, 0} -- par 0 because of leaves
end
local trunk_corner_ps = {}
for n,par in pairs(trunk_corners) do
local p = {}
p.x, p.y, p.z = unpack(string.split(n, " "))
p.par = par
table.insert(trunk_corner_ps, p)
end
local fruit_ps = {}
for n,_ in pairs(fruits) do
local p = {}
p.x, p.y, p.z = unpack(string.split(n, " "))
table.insert(fruit_ps, p)
end end
local manip = minetest.get_voxel_manip() local manip = minetest.get_voxel_manip()
@ -866,8 +851,8 @@ function nether.grow_tree(pos, generated)
local nodes = manip:get_data() local nodes = manip:get_data()
local param2s = manip:get_param2_data() local param2s = manip:get_param2_data()
for _,p in pairs(leaf_ps) do for _,p in pairs(vector.get_data_pos_table(leaves)) do
p = area:indexp(p) p = area:index(p[3], p[2], p[1])
if soft_node(nodes[p]) then if soft_node(nodes[p]) then
nodes[p] = c.nether_leaves nodes[p] = c.nether_leaves
param2s[p] = math.random(0,179) param2s[p] = math.random(0,179)
@ -875,30 +860,28 @@ function nether.grow_tree(pos, generated)
end end
end end
for _,p in pairs(fruit_ps) do for _,p in pairs(vector.get_data_pos_table(fruits)) do
p = area:indexp(p) p = area:index(p[3], p[2], p[1])
if soft_node(nodes[p]) then if soft_node(nodes[p]) then
nodes[p] = c.nether_apple nodes[p] = c.nether_apple
end end
end end
for _,p in pairs(trunk_ps) do for _,p in pairs(trunk_ps) do
local par = p.par local par = p[4]
p = area:indexp(p) p = area:index(p[3], p[2], p[1])
if par then if par then
param2s[p] = par param2s[p] = par
end end
nodes[p] = c.nether_tree nodes[p] = c.nether_tree
end end
for _,p in pairs(trunk_corner_ps) do for _,p in pairs(vector.get_data_pos_table(trunk_corners)) do
local par = p.par local vi = area:index(p[3], p[2], p[1])
p = area:indexp(p) nodes[vi] = c.nether_tree_corner
nodes[p] = c.nether_tree_corner param2s[vi] = p[4]
param2s[p] = par
end end
--calculating took ca. 0.07 - 0.18 [s]
manip:set_data(nodes) manip:set_data(nodes)
manip:set_param2_data(param2s) manip:set_param2_data(param2s)
manip:write_to_map() manip:write_to_map()
@ -906,7 +889,7 @@ function nether.grow_tree(pos, generated)
if generated then if generated then
spam = 3 spam = 3
end end
nether:inform("a nether tree grew at ("..pos.x.."|"..pos.y.."|"..pos.z..")", spam, t1) nether:inform("a nether tree with "..trunk_count.." branch trunk nodes grew at ("..pos.x.."|"..pos.y.."|"..pos.z..")", spam, t1)
if not generated then if not generated then
local t1 = os.clock() local t1 = os.clock()
manip:update_map() manip:update_map()
@ -935,8 +918,8 @@ minetest.register_abm({
minetest.register_abm({ minetest.register_abm({
nodenames = {"nether:tree_sapling"}, nodenames = {"nether:tree_sapling"},
neighbors = {"group:nether_dirt"}, neighbors = {"group:nether_dirt"},
interval = 864, interval = abm_tree_interval,
chance = 100, chance = abm_tree_chance,
action = function(pos) action = function(pos)
if minetest.get_node({x=pos.x, y=pos.y+2, z=pos.z}).name == "air" if minetest.get_node({x=pos.x, y=pos.y+2, z=pos.z}).name == "air"
and minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" then and minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" then
@ -1037,7 +1020,7 @@ dofile(path.."/guide.lua")
local time = math.floor(tonumber(os.clock()-load_time_start)*100+0.5)/100 local time = math.floor(tonumber(os.clock()-load_time_start)*100+0.5)/100
local msg = "[nether] loaded after ca. "..time local msg = "[nether] loaded after ca. "..time
if time > 0.05 then if time > 0.05 then
print(msg) minetest.log("warning", msg)
else else
minetest.log("info", msg) minetest.log("info", msg)
end end

133
nether/items.lua Normal file → Executable file
View File

@ -376,6 +376,18 @@ minetest.register_node("nether:apple", {
if nether_port(user, vector.round(user:getpos())) then if nether_port(user, vector.round(user:getpos())) then
return itemstack return itemstack
end end
local p_hunger = tonumber(hbhunger.hunger[user:get_player_name()])
if not p_hunger then
return
end
p_hunger = p_hunger + 9
if p_hunger > 30 then
p_hunger = 30
end
hbhunger.hunger[user:get_player_name()] = p_hunger
hbhunger.set_hunger(user)
local amount = math.random(4, 6) local amount = math.random(4, 6)
inv:add_item("main", {name="nether:blood_extracted", count=math.floor(amount/3)}) inv:add_item("main", {name="nether:blood_extracted", count=math.floor(amount/3)})
user:set_hp(user:get_hp()-amount) user:set_hp(user:get_hp()-amount)
@ -813,51 +825,53 @@ minetest.register_craftitem("nether:hotbed", {
}) })
-- Modif MFF the entire tool
minetest.register_tool("nether:pick_mushroom", { minetest.register_tool("nether:pick_mushroom", {
description = "Nether Mushroom Pickaxe", description = "Nether Mushroom Pickaxe",
inventory_image = "nether_pick_mushroom.png", inventory_image = "nether_pick_mushroom.png",
tool_capabilities = { tool_capabilities = {
max_drop_level=0, max_drop_level=0,
groupcaps={ groupcaps={
cracky = {times={[3]=3}, uses=1, maxlevel=1}, cracky = {times={[3]=3.0}, uses=5, maxlevel=1},
nether = {times={[3]=3}, uses=1, maxlevel=1}, nether = {times={[3]=3}, uses=5, maxlevel=1},
}, },
damage_groups = {fleshy=2},
}, },
}) })
minetest.register_tool("nether:pick_wood", { minetest.register_tool("nether:pick_wood", { -- Modif MFF the entire tool
description = "Nether Wood Pickaxe", description = "Nether Wood Pickaxe",
inventory_image = "nether_pick_wood.png", inventory_image = "nether_pick_wood.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.2, full_punch_interval = 1.2,
max_drop_level=0, max_drop_level=0,
groupcaps={ groupcaps={
cracky = {times={[3]=1.6}, uses=10, maxlevel=1}, cracky = {times={[3]=1.60}, uses=10, maxlevel=1},
nether = {times={[2]=6, [3]=1.6}, uses=10, maxlevel=1}, nether = {times={[2]=6, [3]=1.60}, uses=10, maxlevel=1},
}, },
damage_groups = {fleshy=2}, damage_groups = {fleshy=2},
}, },
}) })
minetest.register_tool("nether:pick_netherrack", { minetest.register_tool("nether:pick_netherrack", { -- Modif MFF the entire tool
description = "Netherrack Pickaxe", description = "Netherrack Pickaxe",
inventory_image = "nether_pick_netherrack.png", inventory_image = "nether_pick_netherrack.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.3, full_punch_interval = 1.2,
max_drop_level=0, max_drop_level=0,
groupcaps={ groupcaps={
cracky = {times={[2]=2.0, [3]=1.20}, uses=20, maxlevel=1}, cracky = {times={[2]=2.00, [3]=1.20}, uses=20, maxlevel=2},
nether = {times={[1]=16, [2]=2, [3]=1.20}, uses=20, maxlevel=1}, nether = {times={[1]=16, [2]=2.00, [3]=1.20}, uses=20, maxlevel=1},
}, },
damage_groups = {fleshy=3}, damage_groups = {fleshy=3},
}, },
}) })
minetest.register_tool("nether:pick_netherrack_blue", { minetest.register_tool("nether:pick_netherrack_blue", { -- Modif MFF the entire tool
description = "Blue Netherrack Pickaxe", description = "Blue Netherrack Pickaxe",
inventory_image = "nether_pick_netherrack_blue.png", inventory_image = "nether_pick_netherrack_blue.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.0, full_punch_interval = 0.8,
max_drop_level=1, max_drop_level=1,
groupcaps={ groupcaps={
cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=30, maxlevel=2}, cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=30, maxlevel=2},
@ -867,60 +881,62 @@ minetest.register_tool("nether:pick_netherrack_blue", {
}, },
}) })
minetest.register_tool("nether:pick_white", { minetest.register_tool("nether:pick_white", { -- Modif MFF the entire tool
description = "Siwtonic Pickaxe", description = "Siwtonic Pickaxe",
inventory_image = "nether_pick_white.png", inventory_image = "nether_pick_white.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.9, full_punch_interval = 0.5,
max_drop_level=3, max_drop_level=3,
groupcaps={ groupcaps={
cracky = {times={[1]=1, [2]=0.8, [3]=0.3}, uses=180, maxlevel=3}, cracky = {times={[1]=1.75, [2]=0.85, [3]=0.40}, uses=125, maxlevel=3},
nether = {times={[1]=1, [2]=0.5, [3]=0.3}, uses=180, maxlevel=3}, nether = {times={[1]=1, [2]=0.5, [3]=0.3}, uses=125, maxlevel=3},
}, },
damage_groups = {fleshy=5}, damage_groups = {fleshy=5},
}, },
}) })
minetest.register_tool("nether:axe_netherrack", { -- Nether Axe
minetest.register_tool("nether:axe_netherrack", { -- Modif MFF the entire tool
description = "Netherrack Axe", description = "Netherrack Axe",
inventory_image = "nether_axe_netherrack.png", inventory_image = "nether_axe_netherrack.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.3, full_punch_interval = 1.3,
max_drop_level=0, max_drop_level=0,
groupcaps={ groupcaps={
choppy={times={[1]=2.9, [2]=1.9, [3]=1.4}, uses=20, maxlevel=1}, choppy={times={[1]=3.00, [2]=1.00, [3]=0.60}, uses=20, maxlevel=2},
}, },
damage_groups = {fleshy=4}, damage_groups = {fleshy=3},
}, },
}) })
minetest.register_tool("nether:axe_netherrack_blue", { minetest.register_tool("nether:axe_netherrack_blue", { -- Modif MFF the entire tool
description = "Blue Netherrack Axe", description = "Blue Netherrack Axe",
inventory_image = "nether_axe_netherrack_blue.png", inventory_image = "nether_axe_netherrack_blue.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.9, full_punch_interval = 0.9,
max_drop_level=1, max_drop_level=1,
groupcaps={ groupcaps={
choppy={times={[1]=2.5, [2]=1.5, [3]=1}, uses=30, maxlevel=2}, choppy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=30, maxlevel=2},
}, },
damage_groups = {fleshy=6}, damage_groups = {fleshy=4},
}, },
}) })
minetest.register_tool("nether:axe_white", { minetest.register_tool("nether:axe_white", { -- Modif MFF the entire tool
description = "Siwtonic Axe", description = "Siwtonic Axe",
inventory_image = "nether_axe_white.png", inventory_image = "nether_axe_white.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.9, full_punch_interval = 0.9,
max_drop_level=1, max_drop_level=1,
groupcaps={ groupcaps={
choppy={times={[1]=1.2, [2]=0.5, [3]=0.3}, uses=180, maxlevel=2}, choppy={times={[1]=0.90, [2]=0.45, [3]=0.20}, uses=125, maxlevel=3},
}, },
damage_groups = {fleshy=8}, damage_groups = {fleshy=5},
}, },
}) })
minetest.register_tool("nether:shovel_netherrack", { -- Nether Shovel
minetest.register_tool("nether:shovel_netherrack", { -- Modif MFF the entire tool
description = "Netherrack Shovel", description = "Netherrack Shovel",
inventory_image = "nether_shovel_netherrack.png", inventory_image = "nether_shovel_netherrack.png",
wield_image = "nether_shovel_netherrack.png^[transformR90", wield_image = "nether_shovel_netherrack.png^[transformR90",
@ -928,13 +944,13 @@ minetest.register_tool("nether:shovel_netherrack", {
full_punch_interval = 1.4, full_punch_interval = 1.4,
max_drop_level=0, max_drop_level=0,
groupcaps={ groupcaps={
crumbly = {times={[1]=1.7, [2]=1.1, [3]=0.45}, uses=22, maxlevel=2}, crumbly = {times={[1]=3.30, [2]=2.20, [3]=1.32}, uses=20, maxlevel=2},
}, },
damage_groups = {fleshy=2}, damage_groups = {fleshy=3},
}, },
}) })
minetest.register_tool("nether:shovel_netherrack_blue", { minetest.register_tool("nether:shovel_netherrack_blue", { -- Modif MFF the entire tool
description = "Blue Netherrack Shovel", description = "Blue Netherrack Shovel",
inventory_image = "nether_shovel_netherrack_blue.png", inventory_image = "nether_shovel_netherrack_blue.png",
wield_image = "nether_shovel_netherrack_blue.png^[transformR90", wield_image = "nether_shovel_netherrack_blue.png^[transformR90",
@ -942,13 +958,13 @@ minetest.register_tool("nether:shovel_netherrack_blue", {
full_punch_interval = 1.1, full_punch_interval = 1.1,
max_drop_level=1, max_drop_level=1,
groupcaps={ groupcaps={
crumbly = {times={[1]=1.4, [2]=0.8, [3]=0.35}, uses=50, maxlevel=2}, crumbly = {times={[1]=4.40, [2]=1.76, [3]=0.88}, uses=30, maxlevel=2},
}, },
damage_groups = {fleshy=3}, damage_groups = {fleshy=4},
}, },
}) })
minetest.register_tool("nether:shovel_white", { minetest.register_tool("nether:shovel_white", { -- Modif MFF the entire tool
description = "Siwtonic Shovel", description = "Siwtonic Shovel",
inventory_image = "nether_shovel_white.png", inventory_image = "nether_shovel_white.png",
wield_image = "nether_shovel_white.png^[transformR90", wield_image = "nether_shovel_white.png^[transformR90",
@ -956,48 +972,49 @@ minetest.register_tool("nether:shovel_white", {
full_punch_interval = 1, full_punch_interval = 1,
max_drop_level=1, max_drop_level=1,
groupcaps={ groupcaps={
crumbly = {times={[1]=0.95, [2]=0.45, [3]=0.1}, uses=151, maxlevel=3}, crumbly = {times={[1]=1.93, [2]=0.94, [3]=0.44}, uses=125, maxlevel=3},
},
damage_groups = {fleshy=4},
},
})
minetest.register_tool("nether:sword_netherrack", {
description = "Netherrack Sword",
inventory_image = "nether_sword_netherrack.png",
tool_capabilities = {
full_punch_interval = 1,
max_drop_level=0,
groupcaps={
snappy={times={[2]=1.3, [3]=0.38}, uses=40, maxlevel=1},
}, },
damage_groups = {fleshy=5}, damage_groups = {fleshy=5},
}, },
}) })
minetest.register_tool("nether:sword_netherrack_blue", { -- Nether Sword
description = "Blue Netherrack Sword", minetest.register_tool("nether:sword_netherrack", { -- Modif MFF the entire tool
inventory_image = "nether_sword_netherrack_blue.png", description = "Netherrack Sword",
inventory_image = "nether_sword_netherrack.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.8, full_punch_interval = 0.9,
max_drop_level=1, max_drop_level=0,
groupcaps={ groupcaps={
snappy={times={[1]=2.5, [2]=1.1, [3]=0.33}, uses=40, maxlevel=2}, snappy={times={[2]=1.3, [3]=0.38}, uses=40, maxlevel=1},
}, },
damage_groups = {fleshy=7}, damage_groups = {fleshy=4},
}, },
}) })
minetest.register_tool("nether:sword_white", { minetest.register_tool("nether:sword_netherrack_blue", { -- Modif MFF the entire tool
description = "Siwtonic Sword", description = "Blue Netherrack Sword",
inventory_image = "nether_sword_white.png", inventory_image = "nether_sword_netherrack_blue.png",
wield_image = "nether_sword_white.png^[transformR90",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.7, full_punch_interval = 0.7,
max_drop_level=1, max_drop_level=1,
groupcaps={ groupcaps={
snappy={times={[1]=1.7, [2]=0.8, [3]=0.2}, uses=100, maxlevel=3}, snappy={times={[1]=2.5, [2]=1.1, [3]=0.33}, uses=40, maxlevel=2},
}, },
damage_groups = {fleshy=11}, damage_groups = {fleshy=6},
},
})
minetest.register_tool("nether:sword_white", { -- Modif MFF the entire tool
description = "Siwtonic Sword",
inventory_image = "nether_sword_white.png",
wield_image = "nether_sword_white.png^[transformR90",
tool_capabilities = {
full_punch_interval = 0.6,
max_drop_level=1,
groupcaps={
snappy={times={[1]=1.7, [2]=0.8, [3]=0.2}, uses=100, maxlevel=3},
},
damage_groups = {fleshy=8},
}, },
}) })

0
nether/pearl.lua Normal file → Executable file
View File

143
nether/portal.lua Normal file → Executable file
View File

@ -11,6 +11,9 @@ minetest.after(5, function()
abm_allowed = true abm_allowed = true
end) end)
nether.spawn_point = minetest.string_to_pos(minetest.setting_get("nether_static_spawnpoint") or "")
-- If nil then we use random spawn points
table.icontains = table.icontains or function(t, v) table.icontains = table.icontains or function(t, v)
for _,i in ipairs(t) do for _,i in ipairs(t) do
if i == v then if i == v then
@ -20,7 +23,7 @@ table.icontains = table.icontains or function(t, v)
return false return false
end end
local players_in_nether = {} nether.players_in_nether = {}
-- only get info from file if nether prisons -- only get info from file if nether prisons
if nether_prisons then if nether_prisons then
local file = io.open(minetest.get_worldpath()..'/nether_players', "r") local file = io.open(minetest.get_worldpath()..'/nether_players', "r")
@ -28,14 +31,14 @@ if nether_prisons then
local contents = file:read('*all') local contents = file:read('*all')
io.close(file) io.close(file)
if contents then if contents then
players_in_nether = string.split(contents, " ") nether.players_in_nether = string.split(contents, " ")
end end
end end
end end
local function save_nether_players() local function save_nether_players()
local output = '' local output = ''
for _,name in ipairs(players_in_nether) do for _,name in ipairs(nether.players_in_nether) do
output = output..name..' ' output = output..name..' '
end end
local f = io.open(minetest.get_worldpath()..'/nether_players', "w") local f = io.open(minetest.get_worldpath()..'/nether_players', "w")
@ -44,7 +47,7 @@ local function save_nether_players()
end end
local update_background local update_background
if nether_prisons then --if nether_prisons then
function update_background(player, down) function update_background(player, down)
if down then if down then
player:set_sky({r=15, g=0, b=0}, "plain") player:set_sky({r=15, g=0, b=0}, "plain")
@ -52,9 +55,9 @@ if nether_prisons then
player:set_sky(nil, "regular") player:set_sky(nil, "regular")
end end
end end
else --else
function update_background()end -- function update_background()end
end --end
-- returns nodename if area is generated, else calls generation function -- returns nodename if area is generated, else calls generation function
local function generated_or_generate(pos) local function generated_or_generate(pos)
@ -77,6 +80,7 @@ local function get_player_died_target(player)
target.y = portal_target + math.random(4) target.y = portal_target + math.random(4)
return target return target
end end
nether.get_player_died_target = get_player_died_target
-- used for obsidian portal -- used for obsidian portal
local function obsidian_teleport(player, pname) local function obsidian_teleport(player, pname)
@ -86,39 +90,44 @@ local function obsidian_teleport(player, pname)
return true return true
end end
if not mclike_portal then if not mclike_portal then
-- Pick random for obsidian, poor people gotta suffer
local target = vector.round(get_player_died_target(player)) local target = vector.round(get_player_died_target(player))
if generated_or_generate(target) then if generated_or_generate(target) then
player:moveto(target) player:moveto(target)
return true
end end
return true
end end
return false return false
end end
-- teleports players to nether or helps it -- teleports players to nether or helps it
local function player_to_nether(player, safe) function nether.player_to_nether(player, safe)
local pname = player:get_player_name() local pname = player:get_player_name()
if table.icontains(players_in_nether, pname) then if table.icontains(nether.players_in_nether, pname) then
return return
end end
players_in_nether[#players_in_nether+1] = pname nether.players_in_nether[#nether.players_in_nether+1] = pname
save_nether_players() save_nether_players()
if not safe then if not safe then
minetest.chat_send_player(pname, "For any reason you arrived here. Type /nether_help to find out things like craft recipes.") minetest.chat_send_player(pname, "For any reason you arrived here. Type /nether_help to find out things like craft recipes.")
player:set_hp(0) player:set_hp(0)
if not nether_prisons then if not nether_prisons then
player:moveto(get_player_died_target(player)) if nether.spawn_point then
player:moveto(nether.spawn_point)
else
player:moveto(get_player_died_target(player))
end
end end
end end
update_background(player, true) update_background(player, true)
end end
local function player_from_nether(player) function nether.player_from_nether(player)
local pname = player:get_player_name() local pname = player:get_player_name()
local changes local changes
for n,i in ipairs(players_in_nether) do for n,i in ipairs(nether.players_in_nether) do
if i == pname then if i == pname then
table.remove(players_in_nether, n) table.remove(nether.players_in_nether, n)
changes = true changes = true
end end
end end
@ -138,7 +147,9 @@ local function player_exists(name)
return false return false
end end
-- Chatcommands (edited) written by sss
-- Chatcommands removed
--[[ Chatcommands (edited) written by sss
minetest.register_chatcommand("to_hell", { minetest.register_chatcommand("to_hell", {
params = "[<player_name>]", params = "[<player_name>]",
description = "Send someone to hell", description = "Send someone to hell",
@ -176,20 +187,30 @@ minetest.register_chatcommand("from_hell", {
minetest.chat_send_player(pname, "You are free now") minetest.chat_send_player(pname, "You are free now")
player_from_nether(player) player_from_nether(player)
local pos = player:getpos() local pos = player:getpos()
player:moveto({x=pos.x, y=100, z=pos.z}) local pos_togo = {x=pos.x, y=100, z=pos.z}
if minetest.setting_getbool("static_spawnpoint") ~= nil then
local stsp_conf = minetest.setting_get("static_spawnpoint")
pos_togo = {x = stsp_conf:split(",")[1]+0,y = stsp_conf:split(",")[2]+0,z = stsp_conf:split(",")[3]+0}
end
player:moveto(pos_togo)
return true, pname.." is now out of the nether." return true, pname.." is now out of the nether."
end end
}) })]]
if nether_prisons then if nether_prisons then
-- randomly set player position when he/she dies in nether -- randomly set player position when he/she dies in nether
minetest.register_on_respawnplayer(function(player) minetest.register_on_respawnplayer(function(player)
local pname = player:get_player_name() local pname = player:get_player_name()
if not table.icontains(players_in_nether, pname) then if not table.icontains(nether.players_in_nether, pname) then
return return
end end
local target = get_player_died_target(player) local target
if nether.spawn_point then
target = nether.spawn_point
else
target = get_player_died_target(player)
end
player:moveto(target) player:moveto(target)
minetest.after(0, function(pname, target) minetest.after(0, function(pname, target)
-- fixes respawn bug -- fixes respawn bug
@ -206,7 +227,7 @@ if nether_prisons then
for _,player in pairs(minetest.get_connected_players()) do for _,player in pairs(minetest.get_connected_players()) do
local pname = player:get_player_name() local pname = player:get_player_name()
local ppos = player:getpos() local ppos = player:getpos()
if table.icontains(players_in_nether, pname) then if table.icontains(nether.players_in_nether, pname) then
if ppos.y > nether.start then if ppos.y > nether.start then
player:moveto({x=ppos.x, y=portal_target, z=ppos.z}) player:moveto({x=ppos.x, y=portal_target, z=ppos.z})
update_background(player, true) update_background(player, true)
@ -225,15 +246,11 @@ if nether_prisons then
end end
-- fix wrong player positions -- fix wrong player positions
local timer = 0 --doesn't work if the server lags local function tick()
minetest.register_globalstep(function(dtime) update_players()
timer = timer + dtime; minetest.after(2, tick)
if timer >= 2 then end
--minetest.after(1, update_players) tick()
update_players()
timer = 0
end
end)
-- set background when player joins -- set background when player joins
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)
@ -247,15 +264,16 @@ else
-- test if player is in nether when he/she joins -- test if player is in nether when he/she joins
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)
minetest.after(0, function(player) minetest.after(0, function(player)
local pname = player:get_player_name()
if player:getpos().y < nether.start then if player:getpos().y < nether.start then
if not table.icontains(players_in_nether, pname) then if not table.icontains(nether.players_in_nether, pname) then
players_in_nether[#players_in_nether+1] = pname nether.players_in_nether[#nether.players_in_nether+1] = pname
end end
return return
end end
for i,name in pairs(players_in_nether) do for i,name in pairs(nether.players_in_nether) do
if name == pname then if name == pname then
players_in_nether[i] = nil nether.players_in_nether[i] = nil
return return
end end
end end
@ -295,7 +313,7 @@ local particledef = {
-- teleports player to neter (obsidian portal) -- teleports player to neter (obsidian portal)
local function obsi_teleport_player(player, pos, target) local function obsi_teleport_player(player, pos, target)
local pname = player:get_player_name() local pname = player:get_player_name()
if table.icontains(players_in_nether, pname) then if table.icontains(nether.players_in_nether, pname) then
return return
end end
@ -310,7 +328,7 @@ local function obsi_teleport_player(player, pos, target)
return return
end end
players_in_nether[#players_in_nether+1] = pname nether.players_in_nether[#nether.players_in_nether+1] = pname
save_nether_players() save_nether_players()
update_background(player, true) update_background(player, true)
@ -645,40 +663,49 @@ function nether_port(player, pos)
if not netherport(pos) then if not netherport(pos) then
return return
end end
minetest.sound_play("nether_teleporter", {to_player=player:get_player_name()}) --MFF crabman (5/09/2015) fix positional sound don't work to player
minetest.sound_play("nether_teleporter", {pos=pos}) minetest.sound_play("nether_teleporter", {pos=pos})
local meta = minetest.get_meta({x=pos.x, y=pos.y-1, z=pos.z}) local meta = minetest.get_meta({x=pos.x, y=pos.y-1, z=pos.z})
if pos.y < nether.start then if pos.y < nether.start then
set_portal(known_portals_d, pos.z,pos.x, pos.y) set_portal(known_portals_d, pos.z,pos.x, pos.y)
player_from_nether(player) nether.player_from_nether(player)
local my = tonumber(meta:get_string("y")) if minetest.setting_getbool("static_spawnpoint") then
local y = get_portal(known_portals_u, pos.z,pos.x) local stsp_conf = minetest.setting_get("static_spawnpoint")
if y then pos = minetest.string_to_pos(stsp_conf)
if y ~= my then
meta:set_string("y", y)
end
else else
y = my or 100 local my = tonumber(meta:get_string("y"))
local y = get_portal(known_portals_u, pos.z,pos.x)
if y then
if y ~= my then
meta:set_string("y", y)
end
else
y = my or 100
end
pos.y = y
end end
pos.y = y
player:moveto(pos) player:moveto(pos)
else else
set_portal(known_portals_u, pos.z,pos.x, pos.y) if nether.spawn_point then
pos = nether.spawn_point
local my = tonumber(meta:get_string("y"))
local y = get_portal(known_portals_d, pos.z,pos.x)
if y then
if y ~= my then
meta:set_string("y", y)
end
else else
y = my or portal_target+math.random(4) set_portal(known_portals_u, pos.z,pos.x, pos.y)
end
pos.y = y
local my = tonumber(meta:get_string("y"))
local y = get_portal(known_portals_d, pos.z,pos.x)
if y then
if y ~= my then
meta:set_string("y", y)
end
else
y = my or portal_target+math.random(4)
end
pos.y = y
end
player:moveto(pos) player:moveto(pos)
player_to_nether(player, true) nether.player_to_nether(player, true)
end end
minetest.sound_play("nether_teleporter", {pos=pos}) minetest.sound_play("nether_teleporter", {pos=pos})
return true return true

BIN
nether/sounds/nether_dig.1.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_dig.2.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_dug.1.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_dug.2.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_extract_blood.1.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_extract_blood.2.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_extract_blood.3.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_extract_blood.4.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_extract_blood.5.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_extract_blood.6.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_extract_blood.7.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_footstep.1.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_footstep.2.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_footstep.3.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_pearl.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_portal_usual.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_remove_leaf.1.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_remove_leaf.2.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_remove_leaf.3.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_teleporter.1.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_teleporter.2.ogg Normal file → Executable file

Binary file not shown.

BIN
nether/sounds/nether_teleporter.3.ogg Normal file → Executable file

Binary file not shown.

0
nether/textures/nether_axe_netherrack.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

0
nether/textures/nether_axe_netherrack_blue.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

0
nether/textures/nether_axe_white.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 289 B

0
nether/textures/nether_bark.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 440 B

0
nether/textures/nether_blood.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 448 B

After

Width:  |  Height:  |  Size: 448 B

0
nether/textures/nether_blood_cooked.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 541 B

0
nether/textures/nether_blood_empty.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 474 B

0
nether/textures/nether_blood_extracted.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 303 B

0
nether/textures/nether_blood_extractor.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 726 B

0
nether/textures/nether_blood_side.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 478 B

0
nether/textures/nether_blood_side_cooked.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 493 B

After

Width:  |  Height:  |  Size: 493 B

0
nether/textures/nether_blood_side_empty.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 401 B

0
nether/textures/nether_blood_stem.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 446 B

0
nether/textures/nether_blood_stem_cooked.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 607 B

After

Width:  |  Height:  |  Size: 607 B

0
nether/textures/nether_blood_stem_empty.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 532 B

After

Width:  |  Height:  |  Size: 532 B

0
nether/textures/nether_blood_stem_top.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 442 B

0
nether/textures/nether_blood_stem_top_cooked.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 764 B

0
nether/textures/nether_blood_stem_top_empty.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 544 B

0
nether/textures/nether_blood_top.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 463 B

0
nether/textures/nether_blood_top_cooked.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 709 B

0
nether/textures/nether_blood_top_empty.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 471 B

0
nether/textures/nether_dirt.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

0
nether/textures/nether_dirt_normal.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 449 B

0
nether/textures/nether_dirt_top.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 699 B

After

Width:  |  Height:  |  Size: 699 B

0
nether/textures/nether_dirt_top_normal.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 481 B

0
nether/textures/nether_dirt_top_side.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 807 B

0
nether/textures/nether_dirt_top_side_normal.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 669 B

0
nether/textures/nether_dirt_transition.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 670 B

0
nether/textures/nether_dirt_transition_normal.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 528 B

After

Width:  |  Height:  |  Size: 528 B

0
nether/textures/nether_fim.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 222 B

0
nether/textures/nether_forest_planks.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 488 B

0
nether/textures/nether_forest_wood.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 775 B

After

Width:  |  Height:  |  Size: 775 B

0
nether/textures/nether_forest_wood_normal.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 550 B

0
nether/textures/nether_fruit.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 244 B

0
nether/textures/nether_fruit_bottom.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 211 B

0
nether/textures/nether_fruit_leaf.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 359 B

0
nether/textures/nether_fruit_leaves.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 519 B

After

Width:  |  Height:  |  Size: 519 B

0
nether/textures/nether_fruit_no_leaf.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 529 B

After

Width:  |  Height:  |  Size: 529 B

0
nether/textures/nether_fruit_top.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

0
nether/textures/nether_glowflower.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 516 B

0
nether/textures/nether_grass.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

0
nether/textures/nether_grass_big.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 352 B

0
nether/textures/nether_grass_dried.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 218 B

0
nether/textures/nether_grass_middle.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 232 B

0
nether/textures/nether_grass_small.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 186 B

0
nether/textures/nether_hotbed.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 280 B

0
nether/textures/nether_leaves.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 427 B

0
nether/textures/nether_netherrack.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 603 B

0
nether/textures/nether_netherrack_black.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 582 B

0
nether/textures/nether_netherrack_black_normal.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 490 B

After

Width:  |  Height:  |  Size: 490 B

0
nether/textures/nether_netherrack_blue.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 831 B

After

Width:  |  Height:  |  Size: 831 B

0
nether/textures/nether_netherrack_blue_normal.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 693 B

0
nether/textures/nether_netherrack_brick.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 682 B

After

Width:  |  Height:  |  Size: 682 B

0
nether/textures/nether_netherrack_brick_black.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 547 B

0
nether/textures/nether_netherrack_brick_blue.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 726 B

0
nether/textures/nether_netherrack_normal.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 533 B

After

Width:  |  Height:  |  Size: 533 B

0
nether/textures/nether_netherrack_soil.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 397 B

Some files were not shown because too many files have changed in this diff Show More