mirror of
https://github.com/minetest-mods/nether.git
synced 2026-01-08 10:35:26 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69be9adb9c | ||
|
|
c34722d426 | ||
|
|
965a14bb61 | ||
|
|
e0cc038f43 |
@@ -80,5 +80,6 @@ SOFTWARE.
|
|||||||
* `nether_portal.png`: [Extex101](https://github.com/Extex101), 2020
|
* `nether_portal.png`: [Extex101](https://github.com/Extex101), 2020
|
||||||
* `nether_rack`* (files starting with "nether_rack"): Zeg9
|
* `nether_rack`* (files starting with "nether_rack"): Zeg9
|
||||||
* `nether_tool_`* (files starting with "nether_tool_"): color adjusted versions from "[default](https://github.com/minetest/minetest_game/tree/master/mods/default)" mod, originals by BlockMen
|
* `nether_tool_`* (files starting with "nether_tool_"): color adjusted versions from "[default](https://github.com/minetest/minetest_game/tree/master/mods/default)" mod, originals by BlockMen
|
||||||
|
* `nether_nether_block.png`: color adjusted from "[default](https://github.com/minetest/minetest_game/tree/master/mods/default)" mod, original by kilbith
|
||||||
|
|
||||||
All other media: Copyright © 2013 PilzAdam, licensed under CC BY-SA 3.0 by PilzAdam.
|
All other media: Copyright © 2013 PilzAdam, licensed under CC BY-SA 3.0 by PilzAdam.
|
||||||
|
|||||||
15
crafts.lua
15
crafts.lua
@@ -69,4 +69,19 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "nether:nether_block",
|
||||||
|
recipe = {
|
||||||
|
{"nether:nether_ingot", "nether:nether_ingot", "nether:nether_ingot"},
|
||||||
|
{"nether:nether_ingot", "nether:nether_ingot", "nether:nether_ingot"},
|
||||||
|
{"nether:nether_ingot", "nether:nether_ingot", "nether:nether_ingot"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "nether:nether_ingot 9",
|
||||||
|
recipe = {{"nether:nether_block"}}
|
||||||
|
})
|
||||||
|
|
||||||
-- See tools.lua for tools related crafting
|
-- See tools.lua for tools related crafting
|
||||||
|
|
||||||
|
|||||||
2
init.lua
2
init.lua
@@ -144,7 +144,7 @@ if nether.NETHER_REALM_ENABLED then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
dofile(nether.path .. "/portal_examples.lua")
|
dofile(nether.path .. "/portal_examples.lua")
|
||||||
|
dofile(nether.path .. "/ores.lua")
|
||||||
|
|
||||||
-- Portals are ignited by right-clicking with a mese crystal fragment
|
-- Portals are ignited by right-clicking with a mese crystal fragment
|
||||||
nether.register_portal_ignition_item(
|
nether.register_portal_ignition_item(
|
||||||
|
|||||||
13
mapgen.lua
13
mapgen.lua
@@ -495,8 +495,13 @@ function nether.find_nether_ground_y(target_x, target_z, start_y, player_name)
|
|||||||
local minp = {x = minp_schem.x, y = 0, z = minp_schem.z}
|
local minp = {x = minp_schem.x, y = 0, z = minp_schem.z}
|
||||||
local maxp = {x = maxp_schem.x, y = 0, z = maxp_schem.z}
|
local maxp = {x = maxp_schem.x, y = 0, z = maxp_schem.z}
|
||||||
|
|
||||||
for y = start_y, math_max(NETHER_FLOOR + BLEND, start_y - 4096), -1 do
|
local sample_pos = vector.new(target_x, 0, target_z) -- reuse to avoid making new tables
|
||||||
local nval_cave = nobj_cave_point:get_3d({x = target_x, y = y, z = target_z})
|
local y = start_y
|
||||||
|
local limit_y = math_max(NETHER_FLOOR + BLEND, start_y - 4096)
|
||||||
|
|
||||||
|
while y >= limit_y do
|
||||||
|
sample_pos.y = y
|
||||||
|
local nval_cave = nobj_cave_point:get_3d(sample_pos)
|
||||||
|
|
||||||
if nval_cave > TCAVE then -- Cavern
|
if nval_cave > TCAVE then -- Cavern
|
||||||
air = air + 1
|
air = air + 1
|
||||||
@@ -509,12 +514,14 @@ function nether.find_nether_ground_y(target_x, target_z, start_y, player_name)
|
|||||||
if nether.volume_is_natural_and_unprotected(minp, maxp, player_name) then
|
if nether.volume_is_natural_and_unprotected(minp, maxp, player_name) then
|
||||||
return portal_y
|
return portal_y
|
||||||
else -- Restart search a little lower
|
else -- Restart search a little lower
|
||||||
nether.find_nether_ground_y(target_x, target_z, y - 16, player_name)
|
air = 0 -- space above is unsuitable
|
||||||
|
y = y - 16
|
||||||
end
|
end
|
||||||
else -- Not enough space, reset air to zero
|
else -- Not enough space, reset air to zero
|
||||||
air = 0
|
air = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
y = y - 1
|
||||||
end
|
end
|
||||||
|
|
||||||
return math_max(start_y, NETHER_FLOOR + BLEND) -- Fallback
|
return math_max(start_y, NETHER_FLOOR + BLEND) -- Fallback
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ mapgen.add_basalt_columns = function(data, area, minp, maxp)
|
|||||||
local yCaveStride = x1 - x0 + 1
|
local yCaveStride = x1 - x0 + 1
|
||||||
|
|
||||||
local cavePerlin = mapgen.get_cave_point_perlin()
|
local cavePerlin = mapgen.get_cave_point_perlin()
|
||||||
nobj_basalt = nobj_basalt or minetest.get_perlin_map(np_basalt, {x = yCaveStride, y = yCaveStride})
|
nobj_basalt = nobj_basalt or minetest.get_perlin_map(np_basalt, {x = yCaveStride, y = yCaveStride, z = 0})
|
||||||
local nvals_basalt = nobj_basalt:get_2d_map_flat({x=minp.x, y=minp.z}, {x=yCaveStride, y=yCaveStride}, nbuf_basalt)
|
local nvals_basalt = nobj_basalt:get_2d_map_flat({x=minp.x, y=minp.z}, {x=yCaveStride, y=yCaveStride}, nbuf_basalt)
|
||||||
|
|
||||||
local nearest_sea_level, _ = mapgen.find_nearest_lava_sealevel(math_floor((y0 + y1) / 2))
|
local nearest_sea_level, _ = mapgen.find_nearest_lava_sealevel(math_floor((y0 + y1) / 2))
|
||||||
@@ -510,3 +510,5 @@ minetest.register_chatcommand("nether_whereami",
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -318,6 +318,14 @@ minetest.register_node("nether:brick_deep", {
|
|||||||
sounds = default.node_sound_stone_defaults()
|
sounds = default.node_sound_stone_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("nether:nether_block", {
|
||||||
|
description = S("Nether Block"),
|
||||||
|
tiles = {"nether_nether_block.png"},
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {cracky = 1, level = 2, workable_with_nether_tools = 2},
|
||||||
|
sounds = default.node_sound_metal_defaults()
|
||||||
|
})
|
||||||
|
|
||||||
-- Register fence and rails
|
-- Register fence and rails
|
||||||
|
|
||||||
local fence_texture =
|
local fence_texture =
|
||||||
|
|||||||
48
ores.lua
Normal file
48
ores.lua
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
local S = minetest.get_translator("nether")
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node("nether:rack_with_gold", {
|
||||||
|
description = S("Nether Gold"),
|
||||||
|
tiles = {"nether_rack.png^default_mineral_gold.png"},
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = {cracky = 3, level = 2, workable_with_nether_tools = 3, not_in_creative_inventory = 1},
|
||||||
|
drop = "default:gold_lump",
|
||||||
|
sounds = default.node_sound_stone_defaults()
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("nether:rack_deep_with_mese", {
|
||||||
|
description = S("Nether Mese"),
|
||||||
|
tiles = {"nether_rack_deep.png^default_mineral_mese.png"},
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = {cracky = 3, level = 2, workable_with_nether_tools = 3, not_in_creative_inventory = 1},
|
||||||
|
drop = "default:mese_crystal_fragment 4",
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
local ore_ceiling = nether.DEPTH_CEILING - 128
|
||||||
|
local ore_floor = nether.DEPTH_FLOOR + 128
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_ore({
|
||||||
|
ore_type = "scatter",
|
||||||
|
ore = "nether:rack_with_gold",
|
||||||
|
wherein = "nether:rack",
|
||||||
|
clust_scarcity = 15 * 15 * 15,
|
||||||
|
clust_num_ores = 7,
|
||||||
|
clust_size = 5,
|
||||||
|
y_max = ore_ceiling,
|
||||||
|
y_min = ore_floor
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_ore({
|
||||||
|
ore_type = "scatter",
|
||||||
|
ore = "nether:rack_deep_with_mese",
|
||||||
|
wherein = "nether:rack_deep",
|
||||||
|
clust_scarcity = 15 * 15 * 15,
|
||||||
|
clust_num_ores = 7,
|
||||||
|
clust_size = 5,
|
||||||
|
y_max = ore_ceiling,
|
||||||
|
y_min = ore_floor,
|
||||||
|
})
|
||||||
BIN
textures/nether_nether_block.png
Normal file
BIN
textures/nether_nether_block.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 593 B |
Reference in New Issue
Block a user