mirror of
https://github.com/minetest-mods/nether.git
synced 2025-07-19 16:50:56 +02:00
Compare commits
23 Commits
v3.6
...
96c3c01521
Author | SHA1 | Date | |
---|---|---|---|
96c3c01521 | |||
2f886630b4 | |||
4ff727909c | |||
7f5b4277dd | |||
733ac1690a | |||
3b3fb6d1dd | |||
3292146e3c | |||
e5e74c839f | |||
bd2e065ad9 | |||
776a8c95b0 | |||
4950143a00 | |||
ddd27690eb | |||
e0656eacae | |||
89db416d09 | |||
bfdd8d18b4 | |||
60d4f8c7df | |||
281d6fc07f | |||
97cf3250e4 | |||
c0481ea4ca | |||
3577fd1f5e | |||
9ab325fa8c | |||
9e3d5bf997 | |||
c5ef9136ec |
4
init.lua
4
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
|
||||
|
@ -266,7 +266,7 @@ end
|
||||
|
||||
mapgen.getCavePerlinAt = function(pos)
|
||||
cavePointPerlin = cavePointPerlin or minetest.get_perlin(mapgen.np_cave)
|
||||
return cavePointPerlin:get3d(pos)
|
||||
return cavePointPerlin:get_3d(pos)
|
||||
end
|
||||
|
||||
|
||||
@ -485,7 +485,7 @@ function nether.find_nether_ground_y(target_x, target_z, start_y, player_name)
|
||||
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 nval_cave = nobj_cave_point:get3d({x = target_x, y = y, z = target_z})
|
||||
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
|
||||
@ -509,4 +509,4 @@ function nether.find_nether_ground_y(target_x, target_z, start_y, player_name)
|
||||
return math_max(start_y, NETHER_FLOOR + BLEND) -- Fallback
|
||||
end
|
||||
|
||||
minetest.register_on_generated(on_generated)
|
||||
minetest.register_on_generated(on_generated)
|
||||
|
@ -136,7 +136,7 @@ mapgen.add_basalt_columns = function(data, area, minp, maxp)
|
||||
if basaltNoise > 0 then
|
||||
-- a basalt column is here
|
||||
|
||||
local abs_sealevel_cave_noise = math_abs(cavePerlin:get3d({x = x, y = nearest_sea_level, z = z}))
|
||||
local abs_sealevel_cave_noise = math_abs(cavePerlin:get_3d({x = x, y = nearest_sea_level, z = z}))
|
||||
|
||||
-- Add Some quick deterministic noise to the column heights
|
||||
-- This is probably not good noise, but it doesn't have to be.
|
||||
|
@ -216,7 +216,7 @@ function nether.find_nether_ground_y(target_x, target_z, start_y, player_name)
|
||||
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 nval_cave = nobj_cave_point:get3d({x = target_x, y = y, z = target_z})
|
||||
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
|
||||
|
@ -2007,7 +2007,7 @@ local wormhole_nodedef_default = {
|
||||
a = 160, r = 128, g = 0, b = 80
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
use_texture_alpha = true,
|
||||
use_texture_alpha = "blend",
|
||||
walkable = false,
|
||||
diggable = false,
|
||||
pointable = false,
|
||||
@ -2015,7 +2015,6 @@ local wormhole_nodedef_default = {
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
light_source = 5,
|
||||
alpha = 192,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -2169,18 +2168,23 @@ function nether.register_portal_ignition_item(item_name, ignition_failure_sound)
|
||||
|
||||
minetest.override_item(item_name, {
|
||||
on_place = function(stack, placer, pt)
|
||||
local node = minetest.get_node(pt.under)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
local done = false
|
||||
if pt.under and nether.is_frame_node[minetest.get_node(pt.under).name] then
|
||||
|
||||
if pt.under and nether.is_frame_node[node.name] then
|
||||
done = ignite_portal(pt.under, placer:get_player_name())
|
||||
if done and not minetest.settings:get_bool("creative_mode") then
|
||||
stack:take_item()
|
||||
end
|
||||
elseif def and def.on_rightclick then
|
||||
def.on_rightclick(pt.under, node, placer, stack, pt)
|
||||
end
|
||||
|
||||
if not done and ignition_failure_sound ~= nil then
|
||||
minetest.sound_play(ignition_failure_sound, {pos = pt.under, max_hear_distance = 10})
|
||||
end
|
||||
|
||||
|
||||
return stack
|
||||
end,
|
||||
})
|
||||
|
Reference in New Issue
Block a user