8 Commits

Author SHA1 Message Date
27be1dd740 Mention the problematic guide in the Readme 2021-12-22 19:07:12 +01:00
c35d18a519 Fix some deprecation warnings 2021-12-22 18:46:56 +01:00
fb1eca6c11 Add .luacheckrc and do some code fixes 2021-12-22 18:46:52 +01:00
be64a982f8 Remove the invisible folder 2021-12-22 17:53:32 +01:00
56f5909e0f Relicense; WTFPL allows it 2021-12-22 17:45:59 +01:00
7cdd0471a2 depends.txt -> mod.conf 2021-12-22 17:44:27 +01:00
b876d8f2b9 Move the mod description to the forum to reduce duplicate text 2021-12-22 17:39:40 +01:00
870b6a9d47 Fix nether leaves visual_scale
Also, update README
2019-03-10 12:35:51 +01:00
24 changed files with 118 additions and 632 deletions

View File

@ -1,2 +1,2 @@
GPLv3 (lkloel's version)
WTFPL for the changes
MIT for the changes

View File

@ -1,26 +1,15 @@
[Mod] nether-pack [nether-pack]
This is a modified version of lkjoel's nether mod.
Look here if you want to see the differences:
https://github.com/HybridDog/minetest-nether/compare/lkjoel:master...master
Sadly lkjoel's one disappeared…
Thanks a lot to LeMagnesium, crabman77, Ombridride, Gael-de-Sailly, ObaniGemini and other people from server-minetestforfun for working on this mod.
**Depends:** see [depends.txt](https://raw.githubusercontent.com/HybridDog/nether-pack/master/nether/depends.txt)
**License:** see [LICENSE.txt](https://raw.githubusercontent.com/HybridDog/nether-pack/master/LICENSE.txt)
**Download:** [zip](https://github.com/HybridDog/nether-pack/archive/master.zip), [tar.gz](https://github.com/HybridDog/nether-pack/tarball/master)
a long time ago this happened
![I'm a screenshot!](http://i.imgur.com/pMZYqt9.png)
I assume other screenshots could represent this mod in more serious ways
If you got ideas or found bugs, please tell them to me.
[How to install a mod?](http://wiki.minetest.net/Installing_Mods)
For a description of this Minetest mod, please refer to the forum topic:
https://forum.minetest.net/viewtopic.php?f=9&t=10265
TODO:
— find a way to get the perlin noise inside [-1; 1] or use another noise
— add something containing items to that buildings
— update leaves visual_scale
TODO:
* Find a way to get the perlin noise inside [-1; 1] or use another noise
* Add some node which containing items to the simple pyramid "buildings"
* Change the sky background, fog, etc. in the nether
* Improve the guide formspec.
Writing it in Markdown would be nice.
These could be useful:
* https://forum.minetest.net/viewtopic.php?t=23855
Minetest Bedrock Markup Language
* https://github.com/mpeterv/markdown
Markdown to HTML converter; Minetest formspecs support HTML

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"},

15
nether/.luacheckrc Normal file
View File

@ -0,0 +1,15 @@
read_globals = {
-- Defined by Minetest
"minetest", "vector", "PseudoRandom", "VoxelArea", "ItemStack", "dump",
"string",
-- Mods
"default", "stairs", "creative"
}
globals = {"nether"}
ignore = {
"212",
-- Unused argument
"411", "421", "422", "423", "431", "432",
-- Shadowing
}

View File

@ -197,7 +197,7 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv
if not sound_allowed then -- avoid playing the sound multiple times, e.g. when middle mouse click
return
end
minetest.sound_play("default_wood_footstep", {pos=player:getpos(), gain=0.25})
minetest.sound_play("default_wood_footstep", {pos=player:get_pos(), gain=0.25})
sound_allowed = false
minetest.after(0, function()
sound_allowed = true

View File

@ -1,9 +0,0 @@
default
creative?
glow
riesenpilz
stairs
vector_extras
fence_registration?
function_delayer?
watershed?

View File

@ -257,7 +257,7 @@ minetest.register_abm({
meta:set_float("timedif", timediff-times)
for i = 1,times do
for _ = 1,times do
for _,name in pairs({
"fuel_totaltime",
"fuel_time",
@ -292,7 +292,7 @@ minetest.register_abm({
inv:add_item("dst", cooked.item)
-- take stuff from "src" list
inv:set_stack("src", 1, aftercooked.items[1])
else
--~ else
--print("Could not insert '"..cooked.item:to_string().."'")
end
meta:set_string("src_time", 0)

View File

@ -68,10 +68,13 @@ local guide_infos = {
{"text", "One contains 4 kinds of blocks :"},
{"image", {1, 1, cube("nether_blood.png"), 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}},
{"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")}},
{"y", 0.1},
{"text", "Blood stem, blood, blood head and nether fruit"},
{"y", 0.1},
@ -123,10 +126,14 @@ local guide_infos = {
"After that it's recommended to use cooked blood nodes."},
{"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_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}},
{"image", {1, 1, cube("nether_wood_cooked.png"), 4.3}},
{"y", 1.2},
@ -142,14 +149,18 @@ local guide_infos = {
{"text", "Here you can find out information about the nether extractor."},
{"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")}},
{"image", {0.5, 0.5, cube("nether_blood_extractor.png"), 2.5}},
{"image", {0.5, 0.5, "nether_shroom_stem.png", 0.5}},
{"image", {0.5, 0.5, cube("nether_blood_cooked.png"), 1}},
{"image", {0.5, 0.5, cube("nether_blood_cooked.png")}},
{"image", {0.5, 0.5, cube("nether_blood_stem_top_cooked.png", "nether_blood_stem_cooked.png", "nether_blood_stem_cooked.png"), 0.5}},
{"image", {0.5, 0.5, cube("nether_blood_stem_top_cooked.png",
"nether_blood_stem_cooked.png", "nether_blood_stem_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")}},
{"y", 0.2},
@ -347,11 +358,12 @@ for n,i in ipairs(guide_forms) do
end
-- creates contents formspec
local y = 0
for y,i in ipairs(guide_forms) do
local desc, form = unpack(i)
local s = #desc*1.3/font_size+1.5
guide_forms.contents = guide_forms.contents.."button["..guide_size.cx*12/s-0.5 ..","..guide_size.cy+y/1.3 ..";"..s..",1;name;"..desc.."]"
local desc = i[1]
local s = #desc * 1.3 / font_size + 1.5
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
-- shows the contents of the formspec
@ -386,8 +398,10 @@ minetest.register_chatcommand("nether_help", {
minetest.chat_send_player(name, "Something went wrong.")
return false
end
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.")
if player:get_pos().y > nether.start then
minetest.chat_send_player(name,
"Usually you don't neet this guide here. " ..
"You can view it in the nether.")
return false
end
minetest.chat_send_player(name, "Showing guide...")

View File

@ -62,7 +62,7 @@ nether.start = f_h_max+100
local NETHER_HEIGHT = 30
-- Maximum amount of randomness in the map generation
NETHER_RANDOM = 2
local NETHER_RANDOM = 2
-- Frequency of Glowstone on the "roof" of the Nether (higher is less frequent)
local GLOWSTONE_FREQ_ROOF = 500
@ -117,7 +117,7 @@ end
local path = minetest.get_modpath"nether"
dofile(path.."/weird_mapgen_noise.lua")
local nether_weird_noise = dofile(path.."/weird_mapgen_noise.lua")
dofile(path.."/items.lua")
--dofile(path.."/furnace.lua")
dofile(path.."/pearl.lua")
@ -391,18 +391,18 @@ minetest.register_on_generated(function(minp, maxp, seed)
map_lengths_xyz),
}
end
pelin_maps.a:get2dMap_flat({x=minp.x, y=minp.z}, pmap1)
pelin_maps.b:get2dMap_flat({x=minp.x, y=minp.z}, pmap2)
pelin_maps.c:get2dMap_flat({x=minp.x, y=minp.z}, pmap3)
pelin_maps.a:get_2d_map_flat({x=minp.x, y=minp.z}, pmap1)
pelin_maps.b:get_2d_map_flat({x=minp.x, y=minp.z}, pmap2)
pelin_maps.c:get_2d_map_flat({x=minp.x, y=minp.z}, pmap3)
local forest_possible = maxp.y > f_h_min and minp.y < f_h_max
--local pmap_f_bottom = minetest.get_perlin_map(perlins.forest_bottom,
-- map_lengths_xyz):get2dMap_flat({x=minp.x, y=minp.z})
-- map_lengths_xyz):get_2d_map_flat({x=minp.x, y=minp.z})
local perlin_f_bottom, strassx, strassz
if forest_possible then
perlin_f_bottom = minetest.get_perlin(11, 3, 0.8, tmp2)
pelin_maps.forest_top:get2dMap_flat({x=minp.x, y=minp.z}, pmap_f_top)
pelin_maps.forest_top:get_2d_map_flat({x=minp.x, y=minp.z}, pmap_f_top)
strassx = get_ws_list(2, minp.x)
strassz = get_ws_list(2, minp.z)
end
@ -485,7 +485,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
local pstr = p.x.." "..p.z
if not f_perlins[pstr] then
f_perlins[pstr] = math.floor(f_h_min + (math.abs(
perlin_f_bottom:get2d{x=p.x, y=p.z} + 1))
perlin_f_bottom:get_2d{x=p.x, y=p.z} + 1))
* f_yscale_bottom + 0.5)
end
local top_noise = pmap_f_top[count]+1

View File

@ -41,11 +41,13 @@ local function digging_allowed(player, v)
if not player then
return false
end
if creative_installed and creative.is_enabled_for(player:get_player_name()) then
if creative_installed
and creative.is_enabled_for(player:get_player_name()) then
return true
end
local tool = player:get_wielded_item():get_name()
tool = minetest.registered_tools[tool] or tool == "" and minetest.registered_items[tool]
tool = minetest.registered_tools[tool] or tool == ""
and minetest.registered_items[tool]
if not tool
or not tool.tool_capabilities then
return false
@ -210,7 +212,8 @@ add_more_nodes("blood_empty")
minetest.register_node("nether:blood_top", {
description = "Nether Blood Head",
tiles = {"nether_blood_top.png", "nether_blood.png", "nether_blood.png^nether_blood_side.png"},
tiles = {"nether_blood_top.png", "nether_blood.png",
"nether_blood.png^nether_blood_side.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
sounds = default.node_sound_wood_defaults(),
})
@ -218,7 +221,8 @@ add_more_nodes("blood_top")
minetest.register_node("nether:blood_top_cooked", {
description = "Cooked Nether Blood Head",
tiles = {"nether_blood_top_cooked.png", "nether_blood_cooked.png", "nether_blood_cooked.png^nether_blood_side_cooked.png"},
tiles = {"nether_blood_top_cooked.png", "nether_blood_cooked.png",
"nether_blood_cooked.png^nether_blood_side_cooked.png"},
groups = {nether=3},
sounds = nether_sound,
furnace_burntime = 10,
@ -230,7 +234,8 @@ add_more_nodes("blood_top_cooked")
minetest.register_node("nether:blood_top_empty", {
description = "Nether Blood Head Extracted",
tiles = {"nether_blood_top_empty.png", "nether_blood_empty.png", "nether_blood_empty.png^nether_blood_side_empty.png"},
tiles = {"nether_blood_top_empty.png", "nether_blood_empty.png",
"nether_blood_empty.png^nether_blood_side_empty.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
sounds = default.node_sound_wood_defaults(),
})
@ -239,7 +244,8 @@ add_more_nodes("blood_top_empty")
minetest.register_node("nether:blood_stem", {
description = "Nether Blood Stem",
tiles = {"nether_blood_stem_top.png", "nether_blood_stem_top.png", "nether_blood_stem.png"},
tiles = {"nether_blood_stem_top.png", "nether_blood_stem_top.png",
"nether_blood_stem.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
sounds = default.node_sound_wood_defaults(),
})
@ -247,7 +253,8 @@ add_more_nodes("blood_stem")
minetest.register_node("nether:blood_stem_cooked", {
description = "Cooked Nether Blood Stem",
tiles = {"nether_blood_stem_top_cooked.png", "nether_blood_stem_top_cooked.png", "nether_blood_stem_cooked.png"},
tiles = {"nether_blood_stem_top_cooked.png",
"nether_blood_stem_top_cooked.png", "nether_blood_stem_cooked.png"},
groups = {nether=3},
sounds = nether_sound,
furnace_burntime = 30,
@ -259,7 +266,8 @@ add_more_nodes("blood_stem_cooked")
minetest.register_node("nether:blood_stem_empty", {
description = "Nether Blood Stem Extracted",
tiles = {"nether_blood_stem_top_empty.png", "nether_blood_stem_top_empty.png", "nether_blood_stem_empty.png"},
tiles = {"nether_blood_stem_top_empty.png",
"nether_blood_stem_top_empty.png", "nether_blood_stem_empty.png"},
groups = {tree=1, choppy=2, oddly_breakable_by_hand=1},
sounds = default.node_sound_wood_defaults(),
})
@ -351,7 +359,10 @@ minetest.override_item("riesenpilz:nether_shroom", {
minetest.register_node("nether:apple", {
description = "Nether Fruit",
drawtype = "nodebox",
tiles = {"nether_fruit_top.png", "nether_fruit_bottom.png", "nether_fruit.png", "nether_fruit.png^[transformFX", "nether_fruit.png^[transformFX", "nether_fruit.png"},
tiles = {"nether_fruit_top.png", "nether_fruit_bottom.png",
"nether_fruit.png", "nether_fruit.png^[transformFX",
"nether_fruit.png^[transformFX", "nether_fruit.png"},
use_texture_alpha = "opaque",
node_box = {
type = "fixed",
fixed = {
@ -379,7 +390,7 @@ minetest.register_node("nether:apple", {
return
end
itemstack:take_item()
if nether_port(user, vector.round(user:getpos())) then
if nether.teleport_player(user) then
return itemstack
end
local amount = math.random(4, 6)
@ -506,8 +517,10 @@ minetest.register_node("nether:tree", {
minetest.register_node("nether:tree_corner", {
description = "Nether Trunk Corner",
tiles = {"nether_tree.png^[transformR180", "nether_tree_top.png", "nether_tree_corner.png^[transformFY",
"nether_tree_corner.png^[transformR180", "nether_tree.png", "nether_tree_top.png"},
tiles = {"nether_tree.png^[transformR180", "nether_tree_top.png",
"nether_tree_corner.png^[transformFY",
"nether_tree_corner.png^[transformR180", "nether_tree.png",
"nether_tree_top.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,not_in_creative_inventory=1},
@ -528,7 +541,7 @@ minetest.register_node("nether:leaves", {
description = "Nether Leaves",
drawtype = "plantlike",
waving = 1,
visual_scale = math.sqrt(math.sqrt(2)),
visual_scale = math.sqrt(2) + 0.01,
tiles = {"nether_leaves.png"},
inventory_image = "nether_leaves.png",
wield_image = "nether_leaves.png",
@ -629,7 +642,7 @@ minetest.register_node("nether:portal", {
light_source = 12,
paramtype = "light",
sunlight_propagates = true,
use_texture_alpha = true,
use_texture_alpha = "blend",
walkable = false,
pointable = false,
buildable_to = false,

3
nether/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = nether
depends = default,glow,riesenpilz,stairs,vector_extras
optional_depends = creative,fence_registration,function_delayer,watershed

View File

@ -1,22 +1,14 @@
local function table_contains(t, v)
for _,i in pairs(t) do
if v == i then
return true
end
end
return false
end
local creative = minetest.settings:get_bool("creative_mode")
local function throw_pearl(item, player)
local playerpos = player:getpos()
local playerpos = player:get_pos()
playerpos.y = playerpos.y+1.625
local obj = minetest.add_entity(playerpos, "nether:pearl_entity")
local dir = player:get_look_dir()
obj:setvelocity(vector.multiply(dir, 30))
obj:setacceleration({x=dir.x*-3, y=-dir.y^8*80-10, z=dir.z*-3})
obj:get_luaentity().player = player:get_player_name()
if not creative then
local pname = player:get_player_name()
obj:get_luaentity().player = pname
if not minetest.is_creative_enabled(pname) then
item:take_item()
return item
end
@ -107,7 +99,7 @@ minetest.register_entity("nether:pearl_entity", {
self.player = tmp.player
end,
get_staticdata = function(self)
--forceload(vector.round(self.object:getpos()))
--forceload(vector.round(self.object:get_pos()))
return minetest.serialize({
player = self.player,
})
@ -129,7 +121,7 @@ minetest.register_entity("nether:pearl_entity", {
return
end
local pos = self.object:getpos()
local pos = self.object:get_pos()
local rpos = vector.round(pos)
local lastpos = self.lastpos
if not lastpos then

View File

@ -72,7 +72,7 @@ end
-- where the player appears after dying
local function get_player_died_target(player)
local target = vector.add(player:getpos(),
local target = vector.add(player:get_pos(),
{x=math.random(-100,100), y=0, z=math.random(-100,100)})
target.y = portal_target + math.random(4)
return target
@ -172,7 +172,7 @@ minetest.register_chatcommand("from_hell", {
return false, "Something went wrong."
end
minetest.chat_send_player(pname, "You are free now")
local pos = player:getpos()
local pos = player:get_pos()
player_from_nether(player, {x=pos.x, y=100, z=pos.z})
return true, pname.." is now out of the nether."
end
@ -246,7 +246,7 @@ if nether_prisons then
local metatable_overridden
minetest.register_on_joinplayer(function(player)
-- set the background when the player joins
if player:getpos().y < nether.start then
if player:get_pos().y < nether.start then
update_background(player, true)
end
@ -270,7 +270,7 @@ else
-- test if player is in nether when he/she joins
minetest.register_on_joinplayer(function(player)
players_in_nether[player:get_player_name()] =
player:getpos().y < nether.start or nil
player:get_pos().y < nether.start or nil
end)
end
@ -310,7 +310,7 @@ local function obsi_teleport_player(player, pos, target)
return
end
local objpos = player:getpos()
local objpos = player:get_pos()
objpos.y = objpos.y+0.1 -- Fix some glitches at -8000
if minetest.get_node(vector.round(objpos)).name ~= "nether:portal" then
return
@ -484,7 +484,7 @@ local function make_portal(pos)
for d=0,3 do
for y=p1.y,p2.y do
local p = {}
local p
if param2 == 0 then
p = {x=p1.x+d, y=y, z=p1.z}
else
@ -580,8 +580,7 @@ end)
-- a not filled square
vector.square = vector.square or
function(r)
local function vector_square(r)
local tab, n = {}, 1
for i = -r+1, r do
for j = -1, 1, 2 do
@ -601,13 +600,13 @@ local function is_netherportal(pos)
return
end
end
for _,sn in pairs(vector.square(1)) do
for _,sn in pairs(vector_square(1)) do
if minetest.get_node({x=x+sn[1], y=y-1, z=z+sn[2]}).name ~= "nether:netherrack"
or minetest.get_node({x=x+sn[1], y=y+3, z=z+sn[2]}).name ~= "nether:blood_cooked" then
return
end
end
for _,sn in pairs(vector.square(2)) do
for _,sn in pairs(vector_square(2)) do
if minetest.get_node({x=x+sn[1], y=y-1, z=z+sn[2]}).name ~= "nether:netherrack_black"
or minetest.get_node({x=x+sn[1], y=y+3, z=z+sn[2]}).name ~= "nether:wood_empty" then
return
@ -651,13 +650,12 @@ local function set_portal(t, z,x, y)
end
-- used when a player eats that fruit in a portal
function nether_port(player, pos)
if not player
or not pos
or not pos.x then
minetest.log("error", "[nether] nether_port: something failed.")
function nether.teleport_player(player)
if not player then
minetest.log("error", "[nether] Missing player.")
return
end
local pos = vector.round(player:get_pos())
if not is_netherportal(pos) then
return
end

View File

@ -5,7 +5,7 @@ end
local r_chs = {}
function nether_weird_noise(minp, fct, s, seed, range, scale)
local function nether_weird_noise(minp, fct, s, seed, range, scale)
if not r_chs[s] then
r_chs[s] = math.floor(s/3+0.5)
end
@ -86,3 +86,5 @@ minetest.register_node("ac:wmg", {
end
end,
})]]
return nether_weird_noise