Merge branch 'nether_update_without_conflicts'

This commit is contained in:
LeMagnesium 2014-12-16 22:40:02 +01:00
commit db0e531877
147 changed files with 66 additions and 503 deletions

View File

@ -1,4 +0,0 @@
## Generic ignorable patterns and files
*~
.*.swp
debug.txt

0
mods/nether/README.txt Executable file → Normal file
View File

View File

@ -1,3 +0,0 @@
default
hud
stairs?

View File

@ -1,422 +0,0 @@
-- Minetest 0.4 Mod: Nether
local NETHER_DEPTH = -5000
minetest.register_node("nether:portal", {
description = "Nether Portal",
tiles = {
"nether_transparent.png",
"nether_transparent.png",
"nether_transparent.png",
"nether_transparent.png",
{
name = "nether_portal.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.5,
},
},
{
name = "nether_portal.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.5,
},
},
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
use_texture_alpha = true,
walkable = false,
digable = false,
pointable = false,
buildable_to = false,
drop = "",
light_source = 5,
post_effect_color = {a=180, r=128, g=0, b=128},
alpha = 192,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.1, 0.5, 0.5, 0.1},
},
},
groups = {not_in_creative_inventory=1}
})
local function build_portal(pos, target)
local p = {x=pos.x-1, y=pos.y-1, z=pos.z}
local p1 = {x=pos.x-1, y=pos.y-1, z=pos.z}
local p2 = {x=p1.x+3, y=p1.y+4, z=p1.z}
for i=1,4 do
minetest.set_node(p, {name="default:obsidian"})
p.y = p.y+1
end
for i=1,3 do
minetest.set_node(p, {name="default:obsidian"})
p.x = p.x+1
end
for i=1,4 do
minetest.set_node(p, {name="default:obsidian"})
p.y = p.y-1
end
for i=1,3 do
minetest.set_node(p, {name="default:obsidian"})
p.x = p.x-1
end
for x=p1.x,p2.x do
for y=p1.y,p2.y do
p = {x=x, y=y, z=p1.z}
if not (x == p1.x or x == p2.x or y==p1.y or y==p2.y) then
minetest.set_node(p, {name="nether:portal", param2=0})
end
local meta = minetest.get_meta(p)
meta:set_string("p1", minetest.pos_to_string(p1))
meta:set_string("p2", minetest.pos_to_string(p2))
meta:set_string("target", minetest.pos_to_string(target))
if y ~= p1.y then
for z=-2,2 do
if z ~= 0 then
p.z = p.z+z
if minetest.registered_nodes[minetest.get_node(p).name].is_ground_content then
minetest.remove_node(p)
end
p.z = p.z-z
end
end
end
end
end
end
minetest.register_abm({
nodenames = {"nether:portal"},
interval = 1,
chance = 2,
action = function(pos, node)
minetest.add_particlespawner(
32, --amount
4, --time
{x=pos.x-0.25, y=pos.y-0.25, z=pos.z-0.25}, --minpos
{x=pos.x+0.25, y=pos.y+0.25, z=pos.z+0.25}, --maxpos
{x=-0.8, y=-0.8, z=-0.8}, --minvel
{x=0.8, y=0.8, z=0.8}, --maxvel
{x=0,y=0,z=0}, --minacc
{x=0,y=0,z=0}, --maxacc
0.5, --minexptime
1, --maxexptime
1, --minsize
2, --maxsize
false, --collisiondetection
"nether_particle.png" --texture
)
for _,obj in ipairs(minetest.get_objects_inside_radius(pos, 1)) do
if obj:is_player() then
local meta = minetest.get_meta(pos)
local target = minetest.string_to_pos(meta:get_string("target"))
if target then
minetest.after(3, function(obj, pos, target)
local objpos = obj:getpos()
objpos.y = objpos.y+0.1 -- Fix some glitches at -8000
if minetest.get_node(objpos).name ~= "nether:portal" then
return
end
obj:setpos(target)
local function check_and_build_portal(pos, target)
local n = minetest.get_node_or_nil(target)
if n and n.name ~= "nether:portal" then
build_portal(target, pos)
minetest.after(2, check_and_build_portal, pos, target)
minetest.after(4, check_and_build_portal, pos, target)
elseif not n then
minetest.after(1, check_and_build_portal, pos, target)
end
end
minetest.after(1, check_and_build_portal, pos, target)
end, obj, pos, target)
end
end
end
end,
})
local function move_check(p1, max, dir)
local p = {x=p1.x, y=p1.y, z=p1.z}
local d = math.abs(max-p1[dir]) / (max-p1[dir])
while p[dir] ~= max do
p[dir] = p[dir] + d
if minetest.get_node(p).name ~= "default:obsidian" then
return false
end
end
return true
end
local function check_portal(p1, p2)
if p1.x ~= p2.x then
if not move_check(p1, p2.x, "x") then
return false
end
if not move_check(p2, p1.x, "x") then
return false
end
elseif p1.z ~= p2.z then
if not move_check(p1, p2.z, "z") then
return false
end
if not move_check(p2, p1.z, "z") then
return false
end
else
return false
end
if not move_check(p1, p2.y, "y") then
return false
end
if not move_check(p2, p1.y, "y") then
return false
end
return true
end
local function is_portal(pos)
for d=-3,3 do
for y=-4,4 do
local px = {x=pos.x+d, y=pos.y+y, z=pos.z}
local pz = {x=pos.x, y=pos.y+y, z=pos.z+d}
if check_portal(px, {x=px.x+3, y=px.y+4, z=px.z}) then
return px, {x=px.x+3, y=px.y+4, z=px.z}
end
if check_portal(pz, {x=pz.x, y=pz.y+4, z=pz.z+3}) then
return pz, {x=pz.x, y=pz.y+4, z=pz.z+3}
end
end
end
end
local function make_portal(pos)
local p1, p2 = is_portal(pos)
if not p1 or not p2 then
return false
end
for d=1,2 do
for y=p1.y+1,p2.y-1 do
local p
if p1.z == p2.z then
p = {x=p1.x+d, y=y, z=p1.z}
else
p = {x=p1.x, y=y, z=p1.z+d}
end
if minetest.get_node(p).name ~= "air" then
return false
end
end
end
local param2
if p1.z == p2.z then param2 = 0 else param2 = 1 end
local target = {x=p1.x, y=p1.y, z=p1.z}
target.x = target.x + 1
if target.y < NETHER_DEPTH then
target.y = math.random(-50, 20)
else
target.y = NETHER_DEPTH - math.random(500, 1500)
end
for d=0,3 do
for y=p1.y,p2.y do
local p = {}
if param2 == 0 then p = {x=p1.x+d, y=y, z=p1.z} else p = {x=p1.x, y=y, z=p1.z+d} end
if minetest.get_node(p).name == "air" then
minetest.set_node(p, {name="nether:portal", param2=param2})
end
local meta = minetest.get_meta(p)
meta:set_string("p1", minetest.pos_to_string(p1))
meta:set_string("p2", minetest.pos_to_string(p2))
meta:set_string("target", minetest.pos_to_string(target))
end
end
return true
end
minetest.register_node(":default:obsidian", {
description = "Obsidian",
tiles = {"default_obsidian.png"},
is_ground_content = true,
sounds = default.node_sound_stone_defaults(),
groups = {cracky=1,level=2},
on_destruct = function(pos)
local meta = minetest.get_meta(pos)
local p1 = minetest.string_to_pos(meta:get_string("p1"))
local p2 = minetest.string_to_pos(meta:get_string("p2"))
local target = minetest.string_to_pos(meta:get_string("target"))
if not p1 or not p2 then
return
end
for x=p1.x,p2.x do
for y=p1.y,p2.y do
for z=p1.z,p2.z do
local nn = minetest.get_node({x=x,y=y,z=z}).name
if nn == "default:obsidian" or nn == "nether:portal" then
if nn == "nether:portal" then
minetest.remove_node({x=x,y=y,z=z})
end
local m = minetest.get_meta({x=x,y=y,z=z})
m:set_string("p1", "")
m:set_string("p2", "")
m:set_string("target", "")
end
end
end
end
meta = minetest.get_meta(target)
if not meta then
return
end
p1 = minetest.string_to_pos(meta:get_string("p1"))
p2 = minetest.string_to_pos(meta:get_string("p2"))
if not p1 or not p2 then
return
end
for x=p1.x,p2.x do
for y=p1.y,p2.y do
for z=p1.z,p2.z do
local nn = minetest.get_node({x=x,y=y,z=z}).name
if nn == "default:obsidian" or nn == "nether:portal" then
if nn == "nether:portal" then
minetest.remove_node({x=x,y=y,z=z})
end
local m = minetest.get_meta({x=x,y=y,z=z})
m:set_string("p1", "")
m:set_string("p2", "")
m:set_string("target", "")
end
end
end
end
end,
})
minetest.register_craftitem(":default:mese_crystal_fragment", {
description = "Mese Crystal Fragment",
inventory_image = "default_mese_crystal_fragment.png",
on_place = function(stack,_, pt)
if pt.under and minetest.get_node(pt.under).name == "default:obsidian" then
local done = make_portal(pt.under)
if done and not minetest.setting_getbool("creative_mode") then
stack:take_item()
end
end
return stack
end,
})
minetest.register_node("nether:rack", {
description = "Netherrack",
tiles = {"nether_rack.png"},
is_ground_content = true,
drop = {
max_items = 1,
items = {{
rarity = 3,
items = {"nether:rack"},
}}
},
groups = {cracky=3,level=2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("nether:sand", {
description = "Nethersand",
tiles = {"nether_sand.png"},
is_ground_content = true,
groups = {crumbly=3,level=2,falling_node=1},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.45},
}),
})
minetest.register_node("nether:glowstone", {
description = "Glowstone",
tiles = {"nether_glowstone.png"},
is_ground_content = true,
light_source = 13,
groups = {cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("nether:brick", {
description = "Nether Brick",
tiles = {"nether_brick.png"},
groups = {cracky=2,level=2},
sounds = default.node_sound_stone_defaults(),
})
local air = minetest.get_content_id("air")
local stone_with_coal = minetest.get_content_id("default:stone_with_coal")
local stone_with_iron = minetest.get_content_id("default:stone_with_iron")
local stone_with_mese = minetest.get_content_id("default:stone_with_mese")
local stone_with_diamond = minetest.get_content_id("default:stone_with_diamond")
local stone_with_gold = minetest.get_content_id("default:stone_with_gold")
local stone_with_copper = minetest.get_content_id("default:stone_with_copper")
local gravel = minetest.get_content_id("default:gravel")
local dirt = minetest.get_content_id("default:dirt")
local sand = minetest.get_content_id("default:sand")
local cobble = minetest.get_content_id("default:cobble")
local mossycobble = minetest.get_content_id("default:mossycobble")
local stair_cobble = minetest.get_content_id("stairs:stair_cobble")
local lava_source = minetest.get_content_id("default:lava_source")
local lava_flowing = minetest.get_content_id("default:lava_flowing")
local glowstone = minetest.get_content_id("nether:glowstone")
local nethersand = minetest.get_content_id("nether:sand")
local netherbrick = minetest.get_content_id("nether:brick")
local netherrack = minetest.get_content_id("nether:rack")
minetest.register_on_generated(function(minp, maxp, seed)
if maxp.y > NETHER_DEPTH 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}
for i in area:iterp(minp, maxp) do
local d = data[i]
if d == air or d == stone_with_coal or d == stone_with_iron then
data[i] = air
elseif d == stone_with_mese or d == stone_with_diamond or d == lava_source then
data[i] = lava_source
elseif d == lava_flowing then
-- nothing
elseif d == stone_with_gold then
data[i] = glowstone
elseif d == stone_with_copper or d == gravel or d == dirt or d == sand then
data[i] = nethersand
elseif d == cobble or d == mossycobble or d == stair_cobble then
data[i] = netherbrick
else
data[i] = netherrack
end
end
vm:set_data(data)
--vm:set_lighting({day=0, night=0})
vm:calc_lighting()
vm:update_liquids()
vm:write_to_map()
end)

0
mods/nether/modpack.txt Executable file → Normal file
View File

0
mods/nether/nether/crafting.lua Executable file → Normal file
View File

0
mods/nether/nether/depends.txt Executable file → Normal file
View File

88
mods/nether/nether/guide.lua Executable file → Normal file
View File

@ -4,23 +4,19 @@ local cube = minetest.inventorycube
local guide_infos = {
{
description = "mushroom",
{"text", "You can find the nether mushroom on the ground of the nether and on netherrack"..
"soil, it can be dug by hand."},
{"text", "You can find the nether mushroom on the ground of the nether and on netherrack soil, it can be dug by hand."},
{"y", -0.3},
{"image", {1, 1, "riesenpilz_nether_shroom_side.png"}},
{"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 aux1 (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_stem.png"}},
{"y", 0.2},
{"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"..
"2. right click with cooked blood onto the netherrack to make it soiled\n"..
"3. right click onto the netherrack soil with a nether mushroom"..
"head to add some spores\n"..
"4. dig the mushroom which grew after some time to make place for"..
"another one"},
"3. right click onto the netherrack soil with a nether mushroom head to add some spores\n"..
"4. dig the mushroom which grew after some time to make place for another one"},
{"image", {1, 1, "riesenpilz_nether_shroom_side.png", 6, 0.12}},
{"y", 1},
{"image", {1, 1, "nether_netherrack.png^nether_netherrack_soil.png", 1.8}},
@ -32,8 +28,7 @@ local guide_infos = {
},
{
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 types of tools in the nether, which (except the mushroom pick) require sticks to be crafted:"},
{"y", 0.4},
{"image", {1, 1, "nether_pick_mushroom.png"}},
{"text", "strength: 1\n"..
@ -62,13 +57,11 @@ local guide_infos = {
{"image", {1, 1, "nether_sword_white.png", 3}},
{"image", {1, 1, "nether_pick_white.png"}},
{"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",
{"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 dig their nodes even with the bare hand."},
{"y", 0.2},
{"text", "One contains 4 kinds of blocks:"},
{"image", {1, 1, cube("nether_blood.png"), 1}},
@ -82,28 +75,23 @@ local guide_infos = {
{"text", "You can craft the stem to 4 blood wood:"},
{"image", {1, 1, cube("nether_wood.png")}},
{"y", 0.2},
{"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 blood wood, their blood can be extracted."},
},
{
description = "fruit",
{"text", "You can find the nether fruit at blood structures and dig"..
"it even with the bare hand."},
{"text", "You can find the nether fruit at blood structures and dig it even with the bare hand."},
{"y", 0.05},
{"image", {1, 1, "nether_fruit.png"}},
{"text", "You can eat it to get a bit blood because of its acid effect:"},
{"image", {1, 1, "nether_blood_extracted.png"}},
{"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, you teleport instead of getting blood."},
{"y", 0.2},
{"text", "If you drop without holding aux1 (the fast key), you can split"..
"it into its fruit and leaf:"},
{"text", "If you drop it without holding aux1 (the fast key), you can split it into its fruit and leaf:"},
{"image", {1, 1, "nether_fruit_leaf.png", 1}},
{"image", {1, 1, "nether_fruit_no_leaf.png"}},
{"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", "9 fruit leaves can be crafted to a fruit leaves block and the fruit without leaf can be used for crafting a nether pearl."},
{"y", 0.2},
{"image", {1, 1, cube("nether_fruit_leaves.png")}},
{"text", "fruit leaves block"},
@ -111,8 +99,7 @@ local guide_infos = {
{
description = "cooking",
{"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 a strength 1 nether pick to be dug.\n"..
"For crafting the furnace, use the netherrack bricks like cobble:"},
{"y", 0.2},
{"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 0.5}},
@ -136,7 +123,7 @@ local guide_infos = {
2.9}},
{"image", {1, 1, cube("nether_wood_cooked.png"), 4.3}},
{"y", 1},
{"text", "cooked blood stem,cooked blood,cooked blood head,cooked blood wood,"},
{"text", "cooked blood stem, cooked blood, cooked blood head, cooked blood wood,"},
{"y", 0.2},
{"image", {1, 1, "nether_hotbed.png", 0.3}},
{"image", {1, 1, "nether_pearl.png", 2}},
@ -160,8 +147,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")}},
{"y", 0.2},
{"text", "You can extract blood from the blood nodes you get from the blood"..
"structure.\n"..
{"text", "You can extract blood from the blood nodes you get from the blood structure.\n"..
"You can also get blood with a nether fruit."},
{"y", 0.2},
{"text", "So you can use it:\n"..
@ -183,8 +169,7 @@ local guide_infos = {
{"image", {1, 1, "nether_blood.png", 0.82, -0.12}},
{"image", {1, 1, "nether_blood_empty.png", 3.82, -0.12}},
{"y", 1.2},
{"text", "The nether blood stem extracted can be crafted to nether wood,"..
"which can be crafted to nether sticks."},
{"text", "The empty blood stem can be crafted to empty nether wood, which can be crafted to nether sticks."},
},
{
description = "ores",
@ -192,23 +177,19 @@ local guide_infos = {
{"y", 0.4},
{"image", {1, 1, cube("nether_netherrack_black.png"), 4}},
{"image", {1, 1, cube("nether_netherrack.png")}},
{"text", "The red netherrack is generated like stone and the black"..
"netherrack is generated like gravel.\n"..
{"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},
{"image", {1, 1, cube("nether_white.png"), 4}},
{"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"..
{"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},
{"image", {1, 1, cube("nether_netherrack_tiled.png"), 4}},
{"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"..
"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."},
{"text", "The glow stone can be used for lighting and the tiled netherrack is generated like coal ore.\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."},
},
{
description = "vines",
@ -216,8 +197,7 @@ local guide_infos = {
"They can be dug by hand and drop nether children."},
{"image", {1, 1, "nether_vine.png"}},
{"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", "To let a nether child grow to a blood structure, place it at a dark place onto a blood structure head node."},
{"image", {1, 1, "nether_sapling.png"}},
{"y", -0.11},
{"image", {1, 1, "nether_blood.png^nether_blood_side.png"}},
@ -227,15 +207,13 @@ local guide_infos = {
{"text", "The nether pearl can be thrown for teleporting.\n"..
"So cou can get one:"},
{"y", 0.4},
{"text", "At first you need to craft 2 mushroom heads and 1 nether fruit"..
"without leaf together:"},
{"text", "At first you need to craft 2 mushroom heads and 1 nether fruit without leaf together:"},
{"image", {1, 1, "nether_shroom_top.png"}},
{"image", {1, 1, "nether_fim.png", 3}},
{"image", {1, 1, "nether_fruit_no_leaf.png"}},
{"image", {1, 1, "nether_shroom_top.png"}},
{"y", 0.2},
{"text", "Then you need to put the result into the furnance to cook it"..
"to a nether pearl:"},
{"text", "Then you need to put the result into the furnance to cook it to a nether pearl:"},
{"image", {1, 1, "nether_pearl.png"}},
},
{
@ -256,21 +234,19 @@ local guide_infos = {
{"y", 0.4},
{"text", "A nether portal requires following nodes:"},
{"y", 0.05},
{"text", "26 nether wood\n"..
{"text", "21 empty nether wooden planks\n"..
"12 blue netherrack bricks\n"..
"16 black netherrack\n"..
"12 black netherrack\n"..
"8 red netherrack\n"..
"8 cooked nether blood\n"..
"8 cooked nether wood\n"..
"4 nether fruits\n"..
"2 siwtonic blocks"},
{"y", 0.2},
{"text", "It should look approximately like this one:"},
{"image", {5.625, 6, "nether_teleporter.png", 0, -1.5}},
{"y", 5.5},
{"text", "You can activate it by standing in the middle on a siwtonic"..
"block and eating a nether fruit.\n"..
"Don't forget to take enough stuff with you to be able to build"..
"a portal back."},
{"text", "You can activate it by standing in the middle on a siwtonic block and eating a nether fruit.\n"..
"Don't forget to take enough stuff with you to be able to build a portal back."},
},
{
description = "nether forest",
@ -283,13 +259,11 @@ local guide_infos = {
{"image", {1, 1, "nether_grass_small.png"}},
{"y", 0.2},
{"text", "The nether forest grass can be used to get paper.\n"..
"Just dig it, put the grass into the furnace and craft paper"..
"out of the dried grass.\n"..
"Just dig it, put the grass into the furnace and craft paper out of the dried grass.\n"..
"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")}},
{"text", "Nether trunks can be found at nether trees, you can craft"..
"nether wood out of them."},
{"text", "Nether trunks can be found at nether trees, you can craft nether wood out of them."},
{"y", 0.2},
{"image", {1, 1, "nether_glowflower.png"}},
{"text", "Currently this flower can be used for lighting and decoration."},

4
mods/nether/nether/init.lua Executable file → Normal file
View File

@ -11,7 +11,9 @@
-- godkiller447 (ideas)
-- If I didn't list you, please let me know!
nether = nether or {}
if not rawget(_G, "nether") then
nether = {}
end
--== EDITABLE OPTIONS ==--

13
mods/nether/nether/items.lua Executable file → Normal file
View File

@ -366,12 +366,15 @@ minetest.register_node("nether:apple", {
if nether_port(user, vector.round(user:getpos())) then
return itemstack
end
local p_hunger = tonumber(hud.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
hud.hunger[user:get_player_name()] = p_hunger
hud.set_hunger(user)
local amount = math.random(4, 6)
local p_hunger = tonumber(hud.hunger[user:get_player_name()])
p_hunger = p_hunger+9
if p_hunger > 30 then p_hunger = 30 end
hud.hunger[user:get_player_name()] = p_hunger
hud.set_hunger(user)
inv:add_item("main", {name="nether:blood_extracted", count=math.floor(amount/3)})
user:set_hp(user:get_hp()-amount)
return itemstack

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

33
mods/nether/nether/portal.lua Executable file → Normal file
View File

@ -16,7 +16,7 @@ table.icontains = table.icontains or function(t, v)
return false
end
players_in_nether = {}
local players_in_nether = {}
local file = io.open(minetest.get_worldpath()..'/nether_players', "r")
if file then
local contents = file:read('*all')
@ -36,6 +36,19 @@ local function save_nether_players()
io.close(f)
end
local update_background
if damage_enabled then
function update_background(player, down)
if down then
player:set_sky({r=15, g=0, b=0}, "plain")
else
player:set_sky(nil, "regular")
end
end
else
function update_background()end
end
local function player_to_nether(player, safe)
local pname = player:get_player_name()
if table.icontains(players_in_nether, pname) then
@ -47,7 +60,7 @@ local function player_to_nether(player, safe)
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)
end
player:set_sky({r=15, g=0, b=0}, "plain")
update_background(player, true)
end
local function player_from_nether(player)
@ -62,7 +75,7 @@ local function player_from_nether(player)
if changes then
save_nether_players()
end
player:set_sky(nil, "regular")
update_background(player)
end
@ -77,7 +90,6 @@ local function player_exists(name)
end
-- Chatcommands (edited) written by sss
--[[
minetest.register_chatcommand("to_hell", {
params = "",
description = "Send someone to hell",
@ -134,7 +146,7 @@ minetest.register_chatcommand("from_hell", {
return true
end
})
--]]
minetest.register_on_respawnplayer(function(player)
local pname = player:get_player_name()
if not table.icontains(players_in_nether, pname) then
@ -159,13 +171,13 @@ local function update_players()
if table.icontains(players_in_nether, pname) then
if ppos.y > nether.start then
player:moveto({x=ppos.x, y=portal_target, z=ppos.z})
player:set_sky({r=15, g=0, b=0}, "plain")
update_background(player, true)
--[[minetest.kick_player(pname, "\n1. Maybe you were not allowed to teleport out of the nether."..
"\n2. Maybe the server lagged."..
"\n3. please rejoin")]]
end
elseif ppos.y < nether.start then
player:set_sky(nil, "regular")
update_background(player)
player:moveto({x=ppos.x, y=20, z=ppos.z})
--[[minetest.kick_player(pname, "\n1. Maybe you were not allowed to teleport to the nether."..
"\n2. Maybe the server lagged."..
@ -187,7 +199,7 @@ end)
minetest.register_on_joinplayer(function(player)
minetest.after(0, function(player)
if player:getpos().y < nether.start then
player:set_sky({r=15, g=0, b=0}, "plain")
update_background(player, true)
end
end, player)
end)
@ -208,7 +220,7 @@ end
minetest.register_abm({
nodenames = {"nether:portal"},
interval = 1,
chance = 2,
chance = 2,
action = function(pos, node)
if not abm_allowed then
return
@ -524,9 +536,10 @@ function nether_port(player, pos)
player_from_nether(player)
local pos_togo = {x = 0, y = 35, z = -7}
if minetest.setting_getbool("static_spawnpoint") ~= nil then
stsp_conf = minetest.setting_get("static_spawnpoint")
local stsp_conf = minetest.setting_get("static_spawnpoint")
pos_togo = {x = stsp_conf:split(",")[1],y = stsp_conf:split(",")[2],z = stsp_conf:split(",")[3]}
end
table.foreach(pos_togo,print)
player:moveto(pos_togo)
else
player:moveto({x=pos.x, y=portal_target+math.random(4), z=pos.z})

0
mods/nether/nether/rest/Nicht Leere Datei.lua Executable file → Normal file
View File

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

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
mods/nether/nether/rest/nether_glowstone.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

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

Before

Width:  |  Height:  |  Size: 319 B

After

Width:  |  Height:  |  Size: 319 B

View File

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 452 B

View File

Before

Width:  |  Height:  |  Size: 572 B

After

Width:  |  Height:  |  Size: 572 B

0
mods/nether/nether/rest/nether_netherrack.png1 Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
mods/nether/nether/rest/nether_portal_creator.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 762 B

0
mods/nether/nether/rest/nether_tree.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 574 B

0
mods/nether/nether/rest/nether_tree_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 612 B

0
mods/nether/nether/rest/temp.txt Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_dig.1.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_dig.2.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_dug.1.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_dug.2.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_extract_blood.1.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_extract_blood.2.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_extract_blood.3.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_extract_blood.4.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_extract_blood.5.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_extract_blood.6.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_extract_blood.7.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_footstep.1.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_footstep.2.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_footstep.3.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_pearl.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_portal_usual.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_remove_leaf.1.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_remove_leaf.2.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_remove_leaf.3.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_teleporter.1.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_teleporter.2.ogg Executable file → Normal file
View File

0
mods/nether/nether/sounds/nether_teleporter.3.ogg Executable file → Normal file
View File

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

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

View File

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

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

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 289 B

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

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 440 B

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

Before

Width:  |  Height:  |  Size: 448 B

After

Width:  |  Height:  |  Size: 448 B

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

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 541 B

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

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 474 B

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

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 303 B

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

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 726 B

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

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 478 B

View File

Before

Width:  |  Height:  |  Size: 493 B

After

Width:  |  Height:  |  Size: 493 B

View File

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 401 B

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

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 446 B

View File

Before

Width:  |  Height:  |  Size: 607 B

After

Width:  |  Height:  |  Size: 607 B

View File

Before

Width:  |  Height:  |  Size: 532 B

After

Width:  |  Height:  |  Size: 532 B

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

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 442 B

View File

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 764 B

View File

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 544 B

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

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 463 B

View File

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 709 B

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

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 471 B

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

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

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

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 449 B

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

Before

Width:  |  Height:  |  Size: 699 B

After

Width:  |  Height:  |  Size: 699 B

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

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 481 B

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

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 807 B

View File

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 669 B

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

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 670 B

View File

Before

Width:  |  Height:  |  Size: 528 B

After

Width:  |  Height:  |  Size: 528 B

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

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 222 B

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

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 488 B

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

Before

Width:  |  Height:  |  Size: 775 B

After

Width:  |  Height:  |  Size: 775 B

View File

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 550 B

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

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 244 B

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

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 211 B

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

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 359 B

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

Before

Width:  |  Height:  |  Size: 519 B

After

Width:  |  Height:  |  Size: 519 B

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

Before

Width:  |  Height:  |  Size: 529 B

After

Width:  |  Height:  |  Size: 529 B

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

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

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

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 516 B

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

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

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

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 352 B

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

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 218 B

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

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 232 B

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

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 186 B

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

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 280 B

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

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 427 B

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

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 603 B

View File

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 582 B

View File

Before

Width:  |  Height:  |  Size: 490 B

After

Width:  |  Height:  |  Size: 490 B

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

Before

Width:  |  Height:  |  Size: 831 B

After

Width:  |  Height:  |  Size: 831 B

View File

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 693 B

View File

Before

Width:  |  Height:  |  Size: 682 B

After

Width:  |  Height:  |  Size: 682 B

View File

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 547 B

View File

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 726 B

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