mirror of
https://github.com/minetest-mods/nether.git
synced 2024-12-27 19:30:28 +01:00
Update README.md
This commit is contained in:
parent
24845dce1e
commit
4b508f8492
25
README.md
25
README.md
@ -1,10 +1,27 @@
|
|||||||
Nether Mod for Minetest, with Portals API.
|
# Nether Mod for Minetest, with Portals API.
|
||||||
|
|
||||||
|
Enables Nether portals to be built, opening a gateway between the surface
|
||||||
|
realm and one of lava and netherrack, with rumors of a passageway to a great
|
||||||
|
magma ocean.
|
||||||
|
|
||||||
|
To view the options provided by this mod, see settingtypes.txt or
|
||||||
|
go to "Settings"->"All Settings"->"Mods"->"nether" in the game.
|
||||||
|
|
||||||
|
A Nether portal is built as a rectangular vertical frame of obsidian, 4 blocks
|
||||||
|
wide and 5 blocks high. Once constructed, a Mese crystal fragment can be
|
||||||
|
right-click/used on the frame to activate it.
|
||||||
|
|
||||||
|
|
||||||
|
## Modders and game designers
|
||||||
|
|
||||||
See portal_api.txt for how to create custom portals to your own realms.
|
See portal_api.txt for how to create custom portals to your own realms.
|
||||||
|
|
||||||
See settingtypes.txt or go to "Settings"->"All Settings"->"Mods"->"nether"
|
This mod provides Nether basalts (natural, hewn, and chiseled) as nodes which
|
||||||
in the game to view the options provided by this mod.
|
require a player to journey to the magma ocean to obtain, so these can be used
|
||||||
|
for gating progression through a game. For example, a portal to another realm
|
||||||
|
might need to be constructed from basalt, thus requiring a journey through
|
||||||
|
the nether first, or basalt might be a crafting ingredient required to reach
|
||||||
|
a particular branch of the tech-tree.
|
||||||
|
|
||||||
## License of source code:
|
## License of source code:
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ minetest.register_node("nether:native_mapgen", {})
|
|||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "nether_caverns",
|
name = "nether_caverns",
|
||||||
node_stone = "nether:native_mapgen", -- nether:native_mapgen is used here to prevent the native mapgen from placing ores and decorations.
|
node_stone = "nether:native_mapgen", -- nether:native_mapgen is used here to prevent the native mapgen from placing ores and decorations.
|
||||||
node_filler = "nether:native_mapgen", -- The lua on_generate will transform nether:rack_native into nether:rack then decorate and add ores.
|
node_filler = "nether:native_mapgen", -- The lua on_generate will transform nether:native_mapgen into nether:rack then decorate and add ores.
|
||||||
node_dungeon = "nether:brick",
|
node_dungeon = "nether:brick",
|
||||||
node_dungeon_alt = "nether:brick_cracked",
|
node_dungeon_alt = "nether:brick_cracked",
|
||||||
node_dungeon_stair = "stairs:stair_nether_brick",
|
node_dungeon_stair = "stairs:stair_nether_brick",
|
||||||
@ -525,7 +525,7 @@ local function on_generated(minp, maxp, seed)
|
|||||||
|
|
||||||
for y = y0, y1 do -- Y loop first to minimise tcave & lava-sea calculations
|
for y = y0, y1 do -- Y loop first to minimise tcave & lava-sea calculations
|
||||||
|
|
||||||
local sea_level, cavern_limit_distance = mapgen.find_nearest_lava_sealevel(y)
|
local sea_level, cavern_limit_distance = mapgen.find_nearest_lava_sealevel(y) -- function provided by mapgen_mantle.lua
|
||||||
local above_lavasea = y > sea_level
|
local above_lavasea = y > sea_level
|
||||||
local below_lavasea = y < sea_level
|
local below_lavasea = y < sea_level
|
||||||
|
|
||||||
@ -534,7 +534,7 @@ local function on_generated(minp, maxp, seed)
|
|||||||
local tmantle = CENTER_REGION_LIMIT + centerRegionLimit_adj -- cavern_noise_adj already contains central_region_limit_adj, so tmantle is only for comparisons when cavern_noise_adj hasn't been added to the noise value
|
local tmantle = CENTER_REGION_LIMIT + centerRegionLimit_adj -- cavern_noise_adj already contains central_region_limit_adj, so tmantle is only for comparisons when cavern_noise_adj hasn't been added to the noise value
|
||||||
local cavern_noise_adj =
|
local cavern_noise_adj =
|
||||||
CENTER_REGION_LIMIT * (cavern_limit_distance * cavern_limit_distance * cavern_limit_distance) -
|
CENTER_REGION_LIMIT * (cavern_limit_distance * cavern_limit_distance * cavern_limit_distance) -
|
||||||
centerRegionLimit_adj -- cavern_noise_adj gets added to noise value instead of added to the limit np_noise is compared against, so subtract centerRegionLimit_adj so subtract centerRegionLimit_adj instead of adding
|
centerRegionLimit_adj -- cavern_noise_adj gets added to noise value instead of added to the limit np_noise is compared against, so subtract centerRegionLimit_adj instead of adding
|
||||||
|
|
||||||
for z = z0, z1 do
|
for z = z0, z1 do
|
||||||
local vi = area:index(x0, y, z) -- Initial voxelmanip index
|
local vi = area:index(x0, y, z) -- Initial voxelmanip index
|
||||||
@ -548,7 +548,7 @@ local function on_generated(minp, maxp, seed)
|
|||||||
if cave_noise > tcave then
|
if cave_noise > tcave then
|
||||||
-- Prime region
|
-- Prime region
|
||||||
-- This was the only region in initial versions of the Nether mod.
|
-- This was the only region in initial versions of the Nether mod.
|
||||||
-- It is the only region that portals from the surface will open into.
|
-- It is the only region which portals from the surface will open into.
|
||||||
data[vi] = c_air
|
data[vi] = c_air
|
||||||
contains_nether = true
|
contains_nether = true
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ function excavate_pathway(data, area, nether_pos, center_pos, minp, maxp)
|
|||||||
radiusLimit = math_min(radiusLimit, vector_min(vector.subtract(maxp, stopPos)))
|
radiusLimit = math_min(radiusLimit, vector_min(vector.subtract(maxp, stopPos)))
|
||||||
|
|
||||||
if radiusLimit < 4 then -- This is a logic check, ignore it. It could be commented out
|
if radiusLimit < 4 then -- This is a logic check, ignore it. It could be commented out
|
||||||
-- 4 is (79 - 75), and shouldn't be possible if sampling-skip was 10
|
-- 4 is (79 - 75), and values less than 4 shouldn't be possible if sampling-skip was 10
|
||||||
-- i.e. if sampling-skip was 10 then {5, 15, 25, 35, 45, 55, 65, 75} should be sampled from possible positions 0 to 79
|
-- i.e. if sampling-skip was 10 then {5, 15, 25, 35, 45, 55, 65, 75} should be sampled from possible positions 0 to 79
|
||||||
debugf("Error: radiusLimit %s is smaller then half the sampling distance. min %s, max %s, start %s, stop %s", radiusLimit, minp, maxp, startPos, stopPos)
|
debugf("Error: radiusLimit %s is smaller then half the sampling distance. min %s, max %s, start %s, stop %s", radiusLimit, minp, maxp, startPos, stopPos)
|
||||||
end
|
end
|
||||||
@ -304,7 +304,7 @@ function excavate_pathway(data, area, nether_pos, center_pos, minp, maxp)
|
|||||||
local sizeAdj = 1 - (distFromMiddle * distFromMiddle * distFromMiddle)
|
local sizeAdj = 1 - (distFromMiddle * distFromMiddle * distFromMiddle)
|
||||||
|
|
||||||
local radius = math_min(radiusLimit, math.random(50 - (25 * sizeAdj), 80 - (45 * sizeAdj)) / 10)
|
local radius = math_min(radiusLimit, math.random(50 - (25 * sizeAdj), 80 - (45 * sizeAdj)) / 10)
|
||||||
local radiusCubed = radius * radius
|
local radiusSquared = radius * radius
|
||||||
local radiusCeil = math_floor(radius + 0.5)
|
local radiusCeil = math_floor(radius + 0.5)
|
||||||
|
|
||||||
linedata[i].radius = radius -- Needed in third pass
|
linedata[i].radius = radius -- Needed in third pass
|
||||||
@ -315,7 +315,7 @@ function excavate_pathway(data, area, nether_pos, center_pos, minp, maxp)
|
|||||||
local vi_z = vi + z * zstride
|
local vi_z = vi + z * zstride
|
||||||
for y = -radiusCeil, radiusCeil do
|
for y = -radiusCeil, radiusCeil do
|
||||||
local vi_zy = vi_z + y * ystride
|
local vi_zy = vi_z + y * ystride
|
||||||
local xSquaredLimit = radiusCubed - (z * z + y * y)
|
local xSquaredLimit = radiusSquared - (z * z + y * y)
|
||||||
for x = -radiusCeil, radiusCeil do
|
for x = -radiusCeil, radiusCeil do
|
||||||
if x * x < xSquaredLimit then
|
if x * x < xSquaredLimit then
|
||||||
data[vi_zy + x] = c_air
|
data[vi_zy + x] = c_air
|
||||||
@ -327,7 +327,7 @@ function excavate_pathway(data, area, nether_pos, center_pos, minp, maxp)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Third pass: decorate
|
-- Third pass: decorate
|
||||||
-- Add glowstones to make tunnels to the mantle easyier to find
|
-- Add glowstones to make tunnels to the mantle easier to find
|
||||||
-- https://i.imgur.com/sRA28x7.jpg
|
-- https://i.imgur.com/sRA28x7.jpg
|
||||||
for i = start_index, stop_index, 3 do
|
for i = start_index, stop_index, 3 do
|
||||||
if linedata[i].distFromEnds < 0.3 then
|
if linedata[i].distFromEnds < 0.3 then
|
||||||
|
@ -22,6 +22,9 @@ one kind of portal with the same frame material — such as obsidian — provide
|
|||||||
the size of the PortalShape is distinct from any other type of portal that is
|
the size of the PortalShape is distinct from any other type of portal that is
|
||||||
using the same node for its frame, and portal sizes remain small.
|
using the same node for its frame, and portal sizes remain small.
|
||||||
|
|
||||||
|
The Nether provides three variants of Nether basalt to ensure there are
|
||||||
|
alternatives to obsidian for other mods to use as portalstones.
|
||||||
|
|
||||||
|
|
||||||
Realms
|
Realms
|
||||||
------
|
------
|
||||||
|
Loading…
Reference in New Issue
Block a user