2
mods/nether/LICENSE.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
GPLv3 (lkloel's version)
|
||||||
|
WTFPL for the changes
|
21
mods/nether/README.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[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…
|
||||||
|
|
||||||
|
**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)
|
||||||
|
|
||||||
|
this happens really selden to me
|
||||||
|

|
||||||
|
|
||||||
|
If you got ideas or found bugs, please tell them to me.
|
||||||
|
|
||||||
|
[How to install a mod?](http://wiki.minetest.net/Installing_Mods)
|
||||||
|
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
— find a way to get the perlin noise inside [-1; 1] or use another noise
|
@ -1,11 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
||||||
this happens really selden to me
|
|
||||||
http://i.imgur.com/pMZYqt9.png
|
|
||||||
|
|
||||||
|
|
||||||
TODO:
|
|
||||||
— care about nether torches
|
|
||||||
— find a way to get the perlin noise inside [-1; 1] or use another noise
|
|
@ -137,6 +137,14 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "nether:torch",
|
||||||
|
recipe = {
|
||||||
|
{"nether:bark"},
|
||||||
|
{"group:stick"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "nether:forest_wood",
|
output = "nether:forest_wood",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -162,36 +170,38 @@ minetest.register_craft({
|
|||||||
|
|
||||||
local sound_allowed = true
|
local sound_allowed = true
|
||||||
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
|
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
|
||||||
if itemstack:get_name() == "nether:forest_planks"
|
if itemstack:get_name() ~= "nether:forest_planks"
|
||||||
and itemstack:get_count() == 7 then
|
or itemstack:get_count() ~= 7 then
|
||||||
local tree
|
return
|
||||||
for i = 1,9 do
|
end
|
||||||
if old_craft_grid[i]:get_name() == "nether:tree" then
|
local tree
|
||||||
tree = i
|
for i = 1,9 do
|
||||||
break
|
if old_craft_grid[i]:get_name() == "nether:tree" then
|
||||||
end
|
tree = i
|
||||||
end
|
break
|
||||||
if not tree then -- do nth if theres no tree
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local rdif = math.random(-1,1) -- add a bit randomness
|
|
||||||
local barkstack = ItemStack("nether:bark "..4-rdif)
|
|
||||||
local inv = player:get_inventory()
|
|
||||||
if not inv:room_for_item("main", barkstack) then -- disallow crafting if there's not enough free space
|
|
||||||
craft_inv:set_list("craft", old_craft_grid)
|
|
||||||
itemstack:set_name("")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
itemstack:set_count(7+rdif)
|
|
||||||
inv:add_item("main", barkstack)
|
|
||||||
if sound_allowed then
|
|
||||||
minetest.sound_play("default_wood_footstep", {pos=player:getpos(), gain=0.25})
|
|
||||||
sound_allowed = false
|
|
||||||
minetest.after(0, function()
|
|
||||||
sound_allowed = true
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if not tree then -- do nth if theres no tree
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local rdif = math.random(-1,1) -- add a bit randomness
|
||||||
|
local barkstack = ItemStack("nether:bark "..4-rdif)
|
||||||
|
local inv = player:get_inventory()
|
||||||
|
if not inv:room_for_item("main", barkstack) then -- disallow crafting if there's not enough free space
|
||||||
|
craft_inv:set_list("craft", old_craft_grid)
|
||||||
|
itemstack:set_name("")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
itemstack:set_count(7+rdif)
|
||||||
|
inv:add_item("main", barkstack)
|
||||||
|
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})
|
||||||
|
sound_allowed = false
|
||||||
|
minetest.after(0, function()
|
||||||
|
sound_allowed = true
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -2,4 +2,5 @@ default
|
|||||||
glow
|
glow
|
||||||
riesenpilz
|
riesenpilz
|
||||||
stairs
|
stairs
|
||||||
|
fence_registration?
|
||||||
watershed?
|
watershed?
|
||||||
|
@ -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,
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
-- godkiller447 (ideas)
|
-- godkiller447 (ideas)
|
||||||
-- If I didn't list you, please let me know!
|
-- If I didn't list you, please let me know!
|
||||||
|
|
||||||
|
local load_time_start = os.clock()
|
||||||
|
|
||||||
if not rawget(_G, "nether") then
|
if not rawget(_G, "nether") then
|
||||||
nether = {}
|
nether = {}
|
||||||
end
|
end
|
||||||
@ -1029,4 +1031,11 @@ dofile(path.."/crafting.lua")
|
|||||||
dofile(path.."/portal.lua")
|
dofile(path.."/portal.lua")
|
||||||
dofile(path.."/guide.lua")
|
dofile(path.."/guide.lua")
|
||||||
|
|
||||||
nether:inform("loaded!", 1)
|
|
||||||
|
local time = math.floor(tonumber(os.clock()-load_time_start)*100+0.5)/100
|
||||||
|
local msg = "[nether] loaded after ca. "..time
|
||||||
|
if time > 0.05 then
|
||||||
|
minetest.log("warning", msg)
|
||||||
|
else
|
||||||
|
minetest.log("info", msg)
|
||||||
|
end
|
||||||
|
@ -4,42 +4,52 @@ local nether_sound = default.node_sound_stone_defaults({
|
|||||||
footstep = {name="nether_footstep", gain=0.4}
|
footstep = {name="nether_footstep", gain=0.4}
|
||||||
})
|
})
|
||||||
|
|
||||||
local function add_stair_and_slab(name)
|
local add_fence = minetest.register_fence
|
||||||
|
local function add_more_nodes(name)
|
||||||
local nd = "nether:"..name
|
local nd = "nether:"..name
|
||||||
if not string.find(name, "nether") then
|
if not string.find(name, "nether") then
|
||||||
name = "nether_"..name
|
name = "nether_"..name
|
||||||
end
|
end
|
||||||
local data = minetest.registered_nodes[nd]
|
local data = minetest.registered_nodes[nd]
|
||||||
stairs.register_stair_and_slab(name, nd,
|
stairs.register_stair_and_slab(name, nd,
|
||||||
data.groups,
|
data.groups,
|
||||||
data.tiles,
|
data.tiles,
|
||||||
data.description.." Stair",
|
data.description.." Stair",
|
||||||
data.description.." Slab",
|
data.description.." Slab",
|
||||||
data.sounds
|
data.sounds
|
||||||
)
|
)
|
||||||
|
if add_fence then
|
||||||
|
add_fence({fence_of = nd})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
|
local function add_fence(name)
|
||||||
|
local def = minetest.registered_nodes[name]
|
||||||
|
local fencedef = {}
|
||||||
|
for _,i in pairs({"walkable", "sunlike_propagates"}) do
|
||||||
|
if def[i] ~= nil then
|
||||||
|
fencedef[i] = def[i]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--]]
|
||||||
|
|
||||||
local function digging_allowed(player, v)
|
local function digging_allowed(player, v)
|
||||||
if not player then
|
if not player then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local tool = minetest.registered_tools[player:get_wielded_item():get_name()]
|
local tool = minetest.registered_tools[player:get_wielded_item():get_name()]
|
||||||
if not tool then
|
if not tool
|
||||||
|
or not tool.tool_capabilities then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local capabilities = tool.tool_capabilities
|
local groups = tool.tool_capabilities.groupcaps
|
||||||
if not capabilities then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
local groups = capabilities.groupcaps
|
|
||||||
if not groups then
|
if not groups then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local nether = groups.nether
|
if groups.nether
|
||||||
if not nether then
|
and groups.nether.times[v] then
|
||||||
return false
|
|
||||||
end
|
|
||||||
if nether.times[v] then
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
@ -55,7 +65,7 @@ minetest.register_node("nether:netherrack", {
|
|||||||
return digging_allowed(player, 2)
|
return digging_allowed(player, 2)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("netherrack")
|
add_more_nodes("netherrack")
|
||||||
|
|
||||||
minetest.register_node("nether:netherrack_tiled", {
|
minetest.register_node("nether:netherrack_tiled", {
|
||||||
description = "Tiled Netherrack",
|
description = "Tiled Netherrack",
|
||||||
@ -66,7 +76,7 @@ minetest.register_node("nether:netherrack_tiled", {
|
|||||||
return digging_allowed(player, 2)
|
return digging_allowed(player, 2)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("netherrack_tiled")
|
add_more_nodes("netherrack_tiled")
|
||||||
|
|
||||||
minetest.register_node("nether:netherrack_soil", {
|
minetest.register_node("nether:netherrack_soil", {
|
||||||
description = "Dirty Netherrack",
|
description = "Dirty Netherrack",
|
||||||
@ -87,7 +97,7 @@ minetest.register_node("nether:netherrack_black", {
|
|||||||
return digging_allowed(player, 2)
|
return digging_allowed(player, 2)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("netherrack_black")
|
add_more_nodes("netherrack_black")
|
||||||
|
|
||||||
minetest.register_node("nether:netherrack_blue", {
|
minetest.register_node("nether:netherrack_blue", {
|
||||||
description = "Blue Netherrack",
|
description = "Blue Netherrack",
|
||||||
@ -98,7 +108,7 @@ minetest.register_node("nether:netherrack_blue", {
|
|||||||
return digging_allowed(player, 1)
|
return digging_allowed(player, 1)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("netherrack_blue")
|
add_more_nodes("netherrack_blue")
|
||||||
|
|
||||||
-- Netherbrick
|
-- Netherbrick
|
||||||
minetest.register_node("nether:netherrack_brick", {
|
minetest.register_node("nether:netherrack_brick", {
|
||||||
@ -110,7 +120,7 @@ minetest.register_node("nether:netherrack_brick", {
|
|||||||
return digging_allowed(player, 3)
|
return digging_allowed(player, 3)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("netherrack_brick")
|
add_more_nodes("netherrack_brick")
|
||||||
|
|
||||||
minetest.register_node("nether:netherrack_brick_blue", {
|
minetest.register_node("nether:netherrack_brick_blue", {
|
||||||
description = "Blue Netherrack Brick",
|
description = "Blue Netherrack Brick",
|
||||||
@ -121,7 +131,7 @@ minetest.register_node("nether:netherrack_brick_blue", {
|
|||||||
return digging_allowed(player, 3)
|
return digging_allowed(player, 3)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("netherrack_brick_blue")
|
add_more_nodes("netherrack_brick_blue")
|
||||||
|
|
||||||
minetest.register_node("nether:netherrack_brick_black", {
|
minetest.register_node("nether:netherrack_brick_black", {
|
||||||
description = "Black Netherrack Brick",
|
description = "Black Netherrack Brick",
|
||||||
@ -132,7 +142,7 @@ minetest.register_node("nether:netherrack_brick_black", {
|
|||||||
return digging_allowed(player, 3)
|
return digging_allowed(player, 3)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("netherrack_brick_black")
|
add_more_nodes("netherrack_brick_black")
|
||||||
|
|
||||||
minetest.register_node("nether:white", {
|
minetest.register_node("nether:white", {
|
||||||
description = "Siwtonic block",
|
description = "Siwtonic block",
|
||||||
@ -143,7 +153,7 @@ minetest.register_node("nether:white", {
|
|||||||
return digging_allowed(player, 1)
|
return digging_allowed(player, 1)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("white")
|
add_more_nodes("white")
|
||||||
|
|
||||||
|
|
||||||
-- Nether blood
|
-- Nether blood
|
||||||
@ -169,7 +179,7 @@ minetest.register_node("nether:blood", {
|
|||||||
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
add_stair_and_slab("blood")
|
add_more_nodes("blood")
|
||||||
|
|
||||||
minetest.register_node("nether:blood_cooked", {
|
minetest.register_node("nether:blood_cooked", {
|
||||||
description = "Cooked Nether Blood",
|
description = "Cooked Nether Blood",
|
||||||
@ -181,7 +191,7 @@ minetest.register_node("nether:blood_cooked", {
|
|||||||
return digging_allowed(player, 3)
|
return digging_allowed(player, 3)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("blood_cooked")
|
add_more_nodes("blood_cooked")
|
||||||
|
|
||||||
minetest.register_node("nether:blood_empty", {
|
minetest.register_node("nether:blood_empty", {
|
||||||
description = "Nether Blood Extracted",
|
description = "Nether Blood Extracted",
|
||||||
@ -189,7 +199,7 @@ minetest.register_node("nether:blood_empty", {
|
|||||||
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
add_stair_and_slab("blood_empty")
|
add_more_nodes("blood_empty")
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("nether:blood_top", {
|
minetest.register_node("nether:blood_top", {
|
||||||
@ -198,7 +208,7 @@ minetest.register_node("nether:blood_top", {
|
|||||||
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
add_stair_and_slab("blood_top")
|
add_more_nodes("blood_top")
|
||||||
|
|
||||||
minetest.register_node("nether:blood_top_cooked", {
|
minetest.register_node("nether:blood_top_cooked", {
|
||||||
description = "Cooked Nether Blood Head",
|
description = "Cooked Nether Blood Head",
|
||||||
@ -210,7 +220,7 @@ minetest.register_node("nether:blood_top_cooked", {
|
|||||||
return digging_allowed(player, 3)
|
return digging_allowed(player, 3)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("blood_top_cooked")
|
add_more_nodes("blood_top_cooked")
|
||||||
|
|
||||||
minetest.register_node("nether:blood_top_empty", {
|
minetest.register_node("nether:blood_top_empty", {
|
||||||
description = "Nether Blood Head Extracted",
|
description = "Nether Blood Head Extracted",
|
||||||
@ -218,7 +228,7 @@ minetest.register_node("nether:blood_top_empty", {
|
|||||||
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
add_stair_and_slab("blood_top_empty")
|
add_more_nodes("blood_top_empty")
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("nether:blood_stem", {
|
minetest.register_node("nether:blood_stem", {
|
||||||
@ -227,7 +237,7 @@ minetest.register_node("nether:blood_stem", {
|
|||||||
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
add_stair_and_slab("blood_stem")
|
add_more_nodes("blood_stem")
|
||||||
|
|
||||||
minetest.register_node("nether:blood_stem_cooked", {
|
minetest.register_node("nether:blood_stem_cooked", {
|
||||||
description = "Cooked Nether Blood Stem",
|
description = "Cooked Nether Blood Stem",
|
||||||
@ -239,7 +249,7 @@ minetest.register_node("nether:blood_stem_cooked", {
|
|||||||
return digging_allowed(player, 3)
|
return digging_allowed(player, 3)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("blood_stem_cooked")
|
add_more_nodes("blood_stem_cooked")
|
||||||
|
|
||||||
minetest.register_node("nether:blood_stem_empty", {
|
minetest.register_node("nether:blood_stem_empty", {
|
||||||
description = "Nether Blood Stem Extracted",
|
description = "Nether Blood Stem Extracted",
|
||||||
@ -247,7 +257,7 @@ minetest.register_node("nether:blood_stem_empty", {
|
|||||||
groups = {tree=1, choppy=2, oddly_breakable_by_hand=1},
|
groups = {tree=1, choppy=2, oddly_breakable_by_hand=1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
add_stair_and_slab("blood_stem_empty")
|
add_more_nodes("blood_stem_empty")
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("nether:wood", {
|
minetest.register_node("nether:wood", {
|
||||||
@ -256,7 +266,7 @@ minetest.register_node("nether:wood", {
|
|||||||
groups = {choppy=2, oddly_breakable_by_hand=2},
|
groups = {choppy=2, oddly_breakable_by_hand=2},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
add_stair_and_slab("wood")
|
add_more_nodes("wood")
|
||||||
|
|
||||||
minetest.register_node("nether:wood_cooked", {
|
minetest.register_node("nether:wood_cooked", {
|
||||||
description = "Cooked Nether Blood Wood",
|
description = "Cooked Nether Blood Wood",
|
||||||
@ -268,7 +278,7 @@ minetest.register_node("nether:wood_cooked", {
|
|||||||
return digging_allowed(player, 3)
|
return digging_allowed(player, 3)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("wood_cooked")
|
add_more_nodes("wood_cooked")
|
||||||
|
|
||||||
minetest.register_node("nether:wood_empty", {
|
minetest.register_node("nether:wood_empty", {
|
||||||
description = "Nether Wood",
|
description = "Nether Wood",
|
||||||
@ -276,7 +286,7 @@ minetest.register_node("nether:wood_empty", {
|
|||||||
groups = {choppy=2, oddly_breakable_by_hand=2, wood=1},
|
groups = {choppy=2, oddly_breakable_by_hand=2, wood=1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
add_stair_and_slab("wood_empty")
|
add_more_nodes("wood_empty")
|
||||||
|
|
||||||
minetest.register_node("nether:extractor", {
|
minetest.register_node("nether:extractor", {
|
||||||
description = "Nether Blood Extractor",
|
description = "Nether Blood Extractor",
|
||||||
@ -296,7 +306,7 @@ minetest.register_node("nether:fruit_leaves", {
|
|||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
furnace_burntime = 18,
|
furnace_burntime = 18,
|
||||||
})
|
})
|
||||||
add_stair_and_slab("fruit_leaves")
|
add_more_nodes("fruit_leaves")
|
||||||
|
|
||||||
local function room_for_items(inv)
|
local function room_for_items(inv)
|
||||||
local free_slots = 0
|
local free_slots = 0
|
||||||
@ -518,7 +528,7 @@ minetest.register_node("nether:forest_wood", {
|
|||||||
groups = {choppy=2,oddly_breakable_by_hand=2,wood=1},
|
groups = {choppy=2,oddly_breakable_by_hand=2,wood=1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
add_stair_and_slab("forest_wood")
|
add_more_nodes("forest_wood")
|
||||||
|
|
||||||
minetest.register_node("nether:leaves", {
|
minetest.register_node("nether:leaves", {
|
||||||
description = "Nether Leaves",
|
description = "Nether Leaves",
|
||||||
@ -555,7 +565,9 @@ minetest.register_node("nether:dirt", {
|
|||||||
|
|
||||||
minetest.register_node("nether:dirt_top", {
|
minetest.register_node("nether:dirt_top", {
|
||||||
description = "Nether Dirt Top",
|
description = "Nether Dirt Top",
|
||||||
tiles = {"nether_dirt_top.png", "nether_dirt.png", "nether_dirt.png^nether_dirt_top_side.png"},
|
tiles = {"nether_dirt_top.png", "nether_dirt.png",
|
||||||
|
{name="nether_dirt.png^nether_dirt_top_side.png", tileable_vertical = false}
|
||||||
|
},
|
||||||
groups = {crumbly=3,soil=1,nether_dirt=1},
|
groups = {crumbly=3,soil=1,nether_dirt=1},
|
||||||
drop = "nether:dirt",
|
drop = "nether:dirt",
|
||||||
sounds = default.node_sound_dirt_defaults({
|
sounds = default.node_sound_dirt_defaults({
|
||||||
@ -565,7 +577,9 @@ minetest.register_node("nether:dirt_top", {
|
|||||||
|
|
||||||
minetest.register_node("nether:dirt_bottom", {
|
minetest.register_node("nether:dirt_bottom", {
|
||||||
description = "Netherrack Dirt Transition",
|
description = "Netherrack Dirt Transition",
|
||||||
tiles = {"nether_dirt.png", "nether_netherrack.png", "nether_netherrack.png^nether_dirt_transition.png"},
|
tiles = {"nether_dirt.png", "nether_netherrack.png",
|
||||||
|
{name="nether_netherrack.png^nether_dirt_transition.png", tileable_vertical = false}
|
||||||
|
},
|
||||||
groups = {nether=2},
|
groups = {nether=2},
|
||||||
drop = "nether:netherrack",
|
drop = "nether:netherrack",
|
||||||
sounds = default.node_sound_dirt_defaults({
|
sounds = default.node_sound_dirt_defaults({
|
||||||
@ -606,7 +620,7 @@ minetest.register_node("nether:torch", {
|
|||||||
wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
||||||
wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
|
wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
|
||||||
},
|
},
|
||||||
groups = {choppy=2, dig_immediate=3, attached_node=1, hot=2},
|
groups = {choppy=2, dig_immediate=3, attached_node=1, hot=3, igniter=1},
|
||||||
legacy_wallmounted = true,
|
legacy_wallmounted = true,
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
})
|
})
|
||||||
|
@ -37,7 +37,7 @@ local function save_nether_players()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local update_background
|
local update_background
|
||||||
if damage_enabled then
|
--if damage_enabled 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")
|
||||||
@ -45,11 +45,11 @@ if damage_enabled 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
|
||||||
|
|
||||||
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(players_in_nether, pname) then
|
||||||
return
|
return
|
||||||
@ -63,7 +63,7 @@ local function player_to_nether(player, safe)
|
|||||||
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(players_in_nether) do
|
||||||
@ -79,7 +79,7 @@ local function player_from_nether(player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if damage_enabled then
|
--if damage_enabled then
|
||||||
local function player_exists(name)
|
local function player_exists(name)
|
||||||
for _,player in pairs(minetest.get_connected_players()) do
|
for _,player in pairs(minetest.get_connected_players()) do
|
||||||
if player:get_player_name() == name then
|
if player:get_player_name() == name then
|
||||||
@ -93,50 +93,38 @@ end
|
|||||||
-- Chatcommands removed
|
-- Chatcommands removed
|
||||||
--[[ Chatcommands (edited) written by sss
|
--[[ Chatcommands (edited) written by sss
|
||||||
minetest.register_chatcommand("to_hell", {
|
minetest.register_chatcommand("to_hell", {
|
||||||
params = "",
|
params = "[<player_name>]",
|
||||||
description = "Send someone to hell",
|
description = "Send someone to hell",
|
||||||
func = function(name, pname)
|
func = function(name, pname)
|
||||||
if not minetest.get_player_privs(name).nether then
|
if not minetest.check_player_privs(name, {nether=true}) then
|
||||||
local self_player = minetest.get_player_by_name(name)
|
return false, "You need the nether priv to execute this chatcommand."
|
||||||
if self_player then
|
|
||||||
return false, "You can't send anyone to hell."
|
|
||||||
else
|
|
||||||
return false, "Something went wrong."
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if not player_exists(pname) then
|
if not player_exists(pname) then
|
||||||
pname = name
|
pname = name
|
||||||
end
|
end
|
||||||
local player = minetest.get_player_by_name(pname)
|
local player = minetest.get_player_by_name(pname)
|
||||||
if not player then
|
if not player then
|
||||||
minetest.chat_send_player(name, "Something went wrong.")
|
return false, "Something went wrong."
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
minetest.chat_send_player(pname, "Go to hell !!!")
|
minetest.chat_send_player(pname, "Go to hell !!!")
|
||||||
player_to_nether(player)
|
player_to_nether(player)
|
||||||
return true
|
return true, pname.." is now in the nether."
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("from_hell", {
|
minetest.register_chatcommand("from_hell", {
|
||||||
params = "",
|
params = "[<player_name>]",
|
||||||
description = "Extract from hell",
|
description = "Extract from hell",
|
||||||
func = function(name, pname)
|
func = function(name, pname)
|
||||||
if not minetest.get_player_privs(name).nether then
|
if not minetest.check_player_privs(name, {nether=true}) then
|
||||||
local self_player = minetest.get_player_by_name(name)
|
return false, "You need the nether priv to execute this chatcommand."
|
||||||
if self_player then
|
|
||||||
return false, "You can't extract anyone from hell"
|
|
||||||
else
|
|
||||||
return false, "Something went wrong."
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if not player_exists(pname) then
|
if not player_exists(pname) then
|
||||||
pname = name
|
pname = name
|
||||||
end
|
end
|
||||||
local player = minetest.get_player_by_name(pname)
|
local player = minetest.get_player_by_name(pname)
|
||||||
if not player then
|
if not player then
|
||||||
minetest.chat_send_player(name, "Something went wrong.")
|
return false, "Something went wrong."
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
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)
|
||||||
@ -220,6 +208,7 @@ minetest.register_abm({
|
|||||||
nodenames = {"nether:portal"},
|
nodenames = {"nether:portal"},
|
||||||
interval = 1,
|
interval = 1,
|
||||||
chance = 2,
|
chance = 2,
|
||||||
|
catch_up = false,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
if not abm_allowed then
|
if not abm_allowed then
|
||||||
return
|
return
|
||||||
@ -259,7 +248,7 @@ minetest.register_abm({
|
|||||||
remove_portal_essence(pos)
|
remove_portal_essence(pos)
|
||||||
|
|
||||||
minetest.sound_play("nether_portal_usual", {to_player=pname, gain=1})
|
minetest.sound_play("nether_portal_usual", {to_player=pname, gain=1})
|
||||||
player_to_nether(obj)
|
nether.player_to_nether(obj)
|
||||||
--obj:setpos(target)
|
--obj:setpos(target)
|
||||||
|
|
||||||
end, obj, pos, target)
|
end, obj, pos, target)
|
||||||
@ -458,7 +447,7 @@ minetest.after(0.1, function()
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
end)
|
end)
|
||||||
end
|
--end
|
||||||
|
|
||||||
|
|
||||||
vector.square = vector.square or
|
vector.square = vector.square or
|
||||||
@ -520,11 +509,22 @@ local function netherport(pos)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- cache known portals
|
||||||
|
local known_portals_d = {}
|
||||||
|
local known_portals_u = {}
|
||||||
|
local function get_portal(t, z,x)
|
||||||
|
return t[z] and t[z][x]
|
||||||
|
end
|
||||||
|
local function set_portal(t, z,x, y)
|
||||||
|
t[z] = t[z] or {}
|
||||||
|
t[z][x] = y
|
||||||
|
end
|
||||||
|
|
||||||
function nether_port(player, pos)
|
function nether_port(player, pos)
|
||||||
if not player
|
if not player
|
||||||
or not pos
|
or not pos
|
||||||
or not pos.x then
|
or not pos.x then
|
||||||
print("[nether] something failed.")
|
minetest.log("error", "[nether] nether_port: something failed.")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not netherport(pos) then
|
if not netherport(pos) then
|
||||||
@ -533,7 +533,7 @@ function nether_port(player, pos)
|
|||||||
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", {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})
|
||||||
if pos.y < nether.start then
|
if pos.y < nether.start then
|
||||||
player_from_nether(player)
|
nether.player_from_nether(player)
|
||||||
local pos_togo = {x = 0, y = 35, z = -7}
|
local pos_togo = {x = 0, y = 35, z = -7}
|
||||||
if minetest.setting_getbool("static_spawnpoint") ~= nil then
|
if minetest.setting_getbool("static_spawnpoint") ~= nil then
|
||||||
local stsp_conf = minetest.setting_get("static_spawnpoint")
|
local stsp_conf = minetest.setting_get("static_spawnpoint")
|
||||||
@ -541,8 +541,11 @@ function nether_port(player, pos)
|
|||||||
end
|
end
|
||||||
player:moveto(pos_togo)
|
player:moveto(pos_togo)
|
||||||
else
|
else
|
||||||
player:moveto({x=pos.x, y=portal_target+math.random(4), z=pos.z})
|
set_portal(known_portals_u, pos.z,pos.x, pos.y)
|
||||||
|
pos.y = get_portal(known_portals_d, pos.z,pos.x) or portal_target+math.random(4)
|
||||||
|
player:moveto(pos)
|
||||||
player_to_nether(player, true)
|
player_to_nether(player, true)
|
||||||
end
|
end
|
||||||
|
minetest.sound_play("nether_teleporter", {pos=pos})
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
0
mods/nether/nether/rest/Nicht Leere Datei.lua
Executable file → Normal file
BIN
mods/nether/nether/rest/nether_fruit_leaves.png
Executable file → Normal file
Before Width: | Height: | Size: 621 B After Width: | Height: | Size: 1.2 KiB |
BIN
mods/nether/nether/rest/nether_glowstone.png
Executable file → Normal file
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.0 KiB |
BIN
mods/nether/nether/rest/nether_leaves.png
Executable file → Normal file
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 319 B |
BIN
mods/nether/nether/rest/nether_leaves_decision/nether_leaves.png
Executable file → Normal file
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 452 B |
BIN
mods/nether/nether/rest/nether_leaves_decision/nether_leaves_high_cont.png
Executable file → Normal file
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 572 B |
BIN
mods/nether/nether/rest/nether_netherrack.png1
Executable file → Normal file
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
mods/nether/nether/rest/nether_portal_creator.png
Executable file → Normal file
Before Width: | Height: | Size: 687 B After Width: | Height: | Size: 762 B |
BIN
mods/nether/nether/rest/nether_tree.png
Executable file → Normal file
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 574 B |
BIN
mods/nether/nether/rest/nether_tree_top.png
Executable file → Normal file
Before Width: | Height: | Size: 468 B After Width: | Height: | Size: 612 B |