mirror of
https://github.com/minetest-mods/nether.git
synced 2025-11-04 17:45:34 +01:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa22033711 | |||
| da15db184e | |||
| 96a7ac2977 | |||
| 1df107ab94 | |||
| 69e8253193 | |||
| 0eb79653d8 | |||
| 23a6919a49 | |||
| dc21f026f6 | |||
| 6f312d6999 | |||
| e3e793d5be | |||
| 96ef16bf2a | |||
| 44f3912add | |||
| 4ff727909c | |||
| 7f5b4277dd | |||
| 733ac1690a | |||
| 3b3fb6d1dd | |||
| 3292146e3c | |||
| e5e74c839f | |||
| bd2e065ad9 | |||
| 776a8c95b0 | |||
| 4950143a00 | |||
| ddd27690eb | |||
| e0656eacae | |||
| 89db416d09 | |||
| bfdd8d18b4 | |||
| 60d4f8c7df | |||
| 281d6fc07f | |||
| 97cf3250e4 | |||
| c0481ea4ca | |||
| 3577fd1f5e | |||
| 9ab325fa8c | |||
| 9e3d5bf997 | |||
| c5ef9136ec |
6
init.lua
6
init.lua
@@ -57,8 +57,8 @@ nether.fogColor = { -- only used if climate_api is installed
|
||||
|
||||
|
||||
-- Settings
|
||||
nether.DEPTH_CEILING = -5000 -- The y location of the Nether's celing
|
||||
nether.DEPTH_FLOOR = -11000 -- The y location of the Nether's floor
|
||||
nether.DEPTH_CEILING = -25000 -- The y location of the Nether's celing
|
||||
nether.DEPTH_FLOOR = -31000 -- The y location of the Nether's floor
|
||||
nether.FASTTRAVEL_FACTOR = 8 -- 10 could be better value for Minetest, since there's no sprint, but ex-Minecraft players will be mathing for 8
|
||||
nether.PORTAL_BOOK_LOOT_WEIGHTING = 0.9 -- Likelyhood of finding the Book of Portals (guide) in dungeon chests. Set to 0 to disable.
|
||||
nether.NETHER_REALM_ENABLED = true -- Setting to false disables the Nether and Nether portal
|
||||
@@ -144,7 +144,7 @@ if nether.NETHER_REALM_ENABLED then
|
||||
end
|
||||
end
|
||||
dofile(nether.path .. "/portal_examples.lua")
|
||||
dofile(nether.path .. "/ores.lua")
|
||||
|
||||
|
||||
-- Portals are ignited by right-clicking with a mese crystal fragment
|
||||
nether.register_portal_ignition_item(
|
||||
|
||||
13
mapgen.lua
13
mapgen.lua
@@ -495,13 +495,8 @@ 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 maxp = {x = maxp_schem.x, y = 0, z = maxp_schem.z}
|
||||
|
||||
local sample_pos = vector.new(target_x, 0, target_z) -- reuse to avoid making new tables
|
||||
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)
|
||||
for y = start_y, math_max(NETHER_FLOOR + BLEND, start_y - 4096), -1 do
|
||||
local nval_cave = nobj_cave_point:get_3d({x = target_x, y = y, z = target_z})
|
||||
|
||||
if nval_cave > TCAVE then -- Cavern
|
||||
air = air + 1
|
||||
@@ -514,14 +509,12 @@ 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
|
||||
return portal_y
|
||||
else -- Restart search a little lower
|
||||
air = 0 -- space above is unsuitable
|
||||
y = y - 16
|
||||
nether.find_nether_ground_y(target_x, target_z, y - 16, player_name)
|
||||
end
|
||||
else -- Not enough space, reset air to zero
|
||||
air = 0
|
||||
end
|
||||
end
|
||||
y = y - 1
|
||||
end
|
||||
|
||||
return math_max(start_y, NETHER_FLOOR + BLEND) -- Fallback
|
||||
|
||||
48
ores.lua
48
ores.lua
@@ -1,48 +0,0 @@
|
||||
|
||||
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,
|
||||
})
|
||||
Reference in New Issue
Block a user