Mods hinzugefügt und geändert. Höhlen, Himmelsinseln und Asteroiden.

This commit is contained in:
N-Nachtigal 2025-05-15 00:49:46 +02:00
parent df3b4e6104
commit ef2b11dbee
62 changed files with 5344 additions and 121 deletions

View file

@ -0,0 +1,34 @@
Other Worlds
===
Minetest mod which adds asteroid layers.
Each layer contains:
1. Asteroids composed of unique materials.
2. Decoration (or lack of) for the asteroid surfaces, including plants and glowing crystals.
3. A skybox for the layer.
Default layers are Space and Red Sky, but anyone familiar with editing mods should be able to easily adjust these or create different/ additional layers.
Settings
--------
Settings for this mod can be adjusted in Minetests Settings tab -> All Settings
See the comments in this file for how to adjust:
1. The minimum and maximum height of each layer.
2. Whether map-generation is currently active for individual layers.
3. Whether player gravity changes for each layer (off by default).
4. Whether crafting recipes are enabled.
5. Set the chance of finding ores in asteroids (default is 27 [0 to 100]).
Note: It is advised to turn off map-generation after you have generated the required number of asteroids.
Licenses and Attribution
-----------------------
Components of this mod use multiple licenses and were the work of several individuals. Please see license.txt for the full list.

View file

@ -0,0 +1,311 @@
-- submodule
otherworlds.asteroids = {}
-- Approximate realm limits
local XMIN = -33000
local XMAX = 33000
local ZMIN = -33000
local ZMAX = 33000
local ASCOT = 1.0 -- Large asteroid / comet nucleus noise threshold
local SASCOT = 1.0 -- Small asteroid / comet nucleus noise threshold
local STOT = 0.125 -- Asteroid stone threshold
local COBT = 0.05 -- Asteroid cobble threshold
local GRAT = 0.02 -- Asteroid gravel threshold
local ICET = 0.05 -- Comet ice threshold
local ATMOT = -0.2 -- Comet atmosphere threshold
local FISTS = 0.01 -- Fissure noise threshold at surface. Controls size of fissures and amount / size of fissure entrances
local FISEXP = 0.3 -- Fissure expansion rate under surface
local ORECHA = otherworlds.settings.ore_chance.value -- Ore 1/x chance per stone node
local CPCHU = 0 -- Maximum craters per chunk
local CRMIN = 5 -- Crater radius minimum, radius includes dust and obsidian layers
local CRRAN = 8 -- Crater radius range
local random = math.random
local floor = math.floor
local abs = math.abs
-- Note: for fewer large objects: increase the 'spread' numbers in 'np_large' noise parameters. For fewer small objects do the same in 'np_small'. Then tune size with 'ASCOT'
local np_large = { -- 3D Perlin noise 1 for large structures
offset = 0,
scale = 1,
spread = {x = 256, y = 128, z = 256},
seed = -83928935,
octaves = 5,
persist = 0.6}
local np_fissure = { -- 3D Perlin noise 3 for fissures
offset = 0,
scale = 1,
spread = {x = 64, y = 64, z = 64},
seed = -188881,
octaves = 4,
persist = 0.5}
local np_small = { -- 3D Perlin noise 4 for small structures
offset = 0,
scale = 1,
spread = {x = 128, y = 64, z = 128},
seed = 1000760700090,
octaves = 4,
persist = 0.6}
local np_ores = { -- 3D Perlin noise 5 for ore selection
offset = 0,
scale = 1,
spread = {x = 128, y = 128, z = 128},
seed = -70242,
octaves = 1,
persist = 0.5}
local np_latmos = { -- 3D Perlin noise 6 for comet atmosphere
offset = 0,
scale = 1,
spread = {x = 256, y = 128, z = 256},
seed = -83928935,
octaves = 3,
persist = 0.6}
local np_satmos = { -- 3D Perlin noise 7 for small comet atmosphere
offset = 0,
scale = 1,
spread = {x = 128, y = 64, z = 128},
seed = 1000760700090,
octaves = 2,
persist = 0.6}
-- On dignode function. Atmosphere flows into a dug hole.
core.register_on_dignode(function(pos, oldnode, digger)
if core.find_node_near(pos, 1, {"asteroid:atmos"})
and core.get_node(pos).name == "air" then
core.set_node(pos, {name = "asteroid:atmos"})
end
end)
-- Generate on_generated function based on parameters
function otherworlds.asteroids.create_on_generated(YMIN, YMAX, content_ids)
local c_air = content_ids.c_air
local c_stone = content_ids.c_stone
local c_cobble = content_ids.c_cobble
local c_gravel = content_ids.c_gravel
local c_dust = content_ids.c_dust
local c_ironore = content_ids.c_ironore
local c_copperore = content_ids.c_copperore
local c_goldore = content_ids.c_goldore
local c_diamondore = content_ids.c_diamondore
local c_meseore = content_ids.c_meseore
local c_waterice = content_ids.c_waterice
local c_atmos = content_ids.c_atmos
local c_snowblock = content_ids.c_snowblock
local c_obsidian = content_ids.c_obsidian
-- return the function closed over the upvalues we want
return function(minp, maxp, seed)
if minp.x < XMIN or maxp.x > XMAX
or minp.y < YMIN or maxp.y > YMAX
or minp.z < ZMIN or maxp.z > ZMAX then
return
end
local x0, y0, z0 = minp.x, minp.y, minp.z
local x1, y1, z1 = maxp.x, maxp.y, maxp.z
-- local t1 = os.clock()
--print ("[asteroid] chunk ("..x0.." "..y0.." "..z0..")")
local sidelen = x1 - x0 + 1 -- chunk side length
local chulens = {x = sidelen, y = sidelen, z = sidelen}
local minpos = {x = x0, y = y0, z = z0}
local vm, emin, emax = core.get_mapgen_object("voxelmanip")
local area = VoxelArea:new{MinEdge = emin, MaxEdge = emax}
local data = vm:get_data()
local nvals1 = core.get_perlin_map(np_large, chulens):get_3d_map_flat(minpos)
local nvals3 = core.get_perlin_map(np_fissure, chulens):get_3d_map_flat(minpos)
local nvals4 = core.get_perlin_map(np_small, chulens):get_3d_map_flat(minpos)
local nvals5 = core.get_perlin_map(np_ores, chulens):get_3d_map_flat(minpos)
local nvals6 = core.get_perlin_map(np_latmos, chulens):get_3d_map_flat(minpos)
local nvals7 = core.get_perlin_map(np_satmos, chulens):get_3d_map_flat(minpos)
local ni = 1
local noise1abs, noise4abs, comet, noise1dep, noise4dep, vi
for z = z0, z1 do -- for each vertical plane do
for y = y0, y1 do -- for each horizontal row do
vi = area:index(x0, y, z) -- LVM index for first node in x row
for x = x0, x1 do -- for each node do
noise1abs = abs(nvals1[ni])
noise4abs = abs(nvals4[ni])
comet = false
-- comet biome
if nvals6[ni] < -(ASCOT + ATMOT)
or (nvals7[ni] < -(SASCOT + ATMOT) and nvals1[ni] < ASCOT) then
comet = true
end
-- if below surface
if noise1abs > ASCOT or noise4abs > SASCOT then
-- noise1dep zero at surface, positive beneath
noise1dep = noise1abs - ASCOT
-- if no fissure
if abs(nvals3[ni]) > FISTS + noise1dep * FISEXP then
-- noise4dep zero at surface, positive beneath
noise4dep = noise4abs - SASCOT
if not comet
or (comet and (noise1dep > random() + ICET
or noise4dep > random() + ICET)) then
-- asteroid or asteroid materials in comet
if noise1dep >= STOT or noise4dep >= STOT then
-- stone/ores
if random(ORECHA) == 1 then
if nvals5[ni] > 0.6 then
data[vi] = c_goldore
elseif nvals5[ni] < -0.6 then
data[vi] = c_diamondore
elseif nvals5[ni] > 0.2 then
data[vi] = c_meseore
elseif nvals5[ni] < -0.2 then
data[vi] = c_copperore
else
data[vi] = c_ironore
end
else
data[vi] = c_stone
end
elseif noise1dep >= COBT or noise4dep >= COBT then
data[vi] = c_cobble
elseif noise1dep >= GRAT or noise4dep >= GRAT then
data[vi] = c_gravel
else
data[vi] = c_dust
end
else -- comet materials
if noise1dep >= ICET or noise4dep >= ICET then
data[vi] = c_waterice
else
data[vi] = c_snowblock
end
end
elseif comet then -- fissures, if comet then add atmosphere
data[vi] = c_atmos
end
elseif comet then -- if comet atmosphere then
data[vi] = c_atmos
end
ni = ni + 1
vi = vi + 1
end
end
end
local cr, cx, cz, comet, surfy, vi, nr, nodeid
-- craters
for ci = 1, CPCHU do -- iterate
-- exponential radius
cr = CRMIN + floor(random() ^ 2 * CRRAN)
cx = random(minp.x + cr, maxp.x - cr) -- centre x
cz = random(minp.z + cr, maxp.z - cr) -- centre z
comet = false
surfy = false
for y = y1, y0 + cr, -1 do
vi = area:index(cx, y, cz) -- LVM index for node
nodeid = data[vi]
if nodeid == c_dust or nodeid == c_gravel or nodeid == c_cobble then
surfy = y
break
elseif nodename == c_snowblock or nodename == c_waterice then
comet = true
surfy = y
break
end
end
-- if surface found and 8 node space above impact node then
if surfy and y1 - surfy > 8 then
for x = cx - cr, cx + cr do -- for each plane do
for z = cz - cr, cz + cr do -- for each column do
for y = surfy - cr, surfy + cr do -- for each node do
-- LVM index for node
vi = area:index(x, y, z)
nr = ((x - cx) ^ 2 + (y - surfy) ^ 2 + (z - cz) ^ 2) ^ 0.5
if nr <= cr - 2 then
if comet then
data[vi] = c_atmos
else
data[vi] = c_air
end
elseif nr <= cr - 1 then
nodeid = data[vi]
if nodeid == c_gravel or nodeid == c_cobble
or nodeid == c_stone or nodeid == c_diamondore
or nodeid == c_goldore or nodeid == c_meseore
or nodeid == c_copperore or nodeid == c_ironore then
data[vi] = c_dust
end
elseif nr <= cr then
nodeid = data[vi]
if nodeid == c_cobble or nodeid == c_stone then
data[vi] = c_obsidian -- obsidian buried under dust
end
end
end
end
end
end
end
vm:set_data(data)
vm:set_lighting({day = 0, night = 0})
vm:calc_lighting()
vm:write_to_map(data)
data = nil ; collectgarbage("collect") -- clear mem
--[[
local chugent = math.ceil((os.clock() - t1) * 1000)
print ("[asteroid] time "..chugent.." ms / used mem:"
.. collectgarbage("count") / 1024 .. " MiB")
]]--
end
end

View file

@ -0,0 +1,47 @@
-- register craft recipes when enabled
if otherworlds.settings.crafting.enable then
core.register_craft({
output = "asteroid:cobble",
recipe = {{"asteroid:stone"}}
})
core.register_craft({
output = "asteroid:gravel",
recipe = {{"asteroid:cobble"}}
})
core.register_craft({
output = "asteroid:dust",
recipe = {{"asteroid:gravel"}}
})
core.register_craft({
type = "cooking",
output = "asteroid:stone",
recipe = "asteroid:cobble"
})
core.register_craft({
output = "asteroid:redcobble",
recipe = {{"asteroid:redstone"}}
})
core.register_craft({
output = "asteroid:redgravel",
recipe = {{"asteroid:redcobble"}}
})
core.register_craft({
output = "asteroid:reddust",
recipe = {{"asteroid:redgravel"}}
})
core.register_craft({
type = "cooking",
output = "asteroid:redstone",
recipe = "asteroid:redcobble"
})
end

View file

@ -0,0 +1,26 @@
-- global, mod path and load mod sections
otherworlds = {}
local modpath = core.get_modpath("other_worlds") .. "/"
dofile(modpath .. "settings.lua")
dofile(modpath .. "nodes.lua")
dofile(modpath .. "crafting.lua")
dofile(modpath .. "skybox.lua")
-- required helpers for mapgen options below
dofile(modpath .. "asteroid_layer_helpers.lua")
if otherworlds.settings.space_asteroids.enable then
dofile(modpath .. "space_asteroids.lua")
end
if otherworlds.settings.redsky_asteroids.enable then
dofile(modpath .. "redsky_asteroids.lua")
end
print("[MOD] Other Worlds loaded")

View file

@ -0,0 +1,38 @@
Original asteroids code:
License: MIT (https://opensource.org/licenses/MIT)
By paramat (available from https://github.com/paramat/asteroid)
Original asteroid_ textures:
License: CC BY-SA 3.0 (https://creativecommons.org/licenses/by/3.0/)
Attribution: paramat
Crystal models:
License: MIT (https://opensource.org/licenses/MIT)
By Electra Gizen
Skybox texture:
License: CC BY-SA 3.0 (https://creativecommons.org/licenses/by/3.0/)
Attribution: Ulukai (available from http://opengameart.org/content/ulukais-space-skyboxes)
---
Recoloured textures from various mods:
Grass textures based on default mod in minetest_game (WTFPL).
Redgrass texture based on junglegrass texture in default mod in minetest_game (assumed to be CC BY-SA 3.0).
Red versions of asteroid textures (CC BY-SA 3.0).
---
Textures created for this mod:
CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)
Attribution: Shara RedCat
All original code and edits to code for this mod:
License: MIT (https://opensource.org/licenses/MIT)
By Shara RedCat, tenplus1 and Mewmon
---
Thanks also to DonBatman for help with the initial idea, and to the players of Red Cat Creative who gave ideas and helped in testing.

View file

@ -0,0 +1,8 @@
name = other_worlds
description = Adds asteroid layers and height-based skybox switches to create space environments.
depends = default
optional_depends = pova, nether
min_minetest_version = 5.0
release = 30955
author = TenPlus1
title = Other Worlds

View file

@ -0,0 +1,228 @@
# Blender v2.77 (sub 0) OBJ File: ''
# www.blender.org
mtllib crystal_shape01.mtl
o Crystal_Taya1.001
v 0.019427 0.022291 -0.013603
v 0.012823 0.031159 -0.009449
v 0.013985 0.030045 -0.009115
v 0.008443 0.038346 -0.005912
v 0.000000 0.050687 0.000000
v -0.015208 0.018939 -0.021719
v 0.020909 0.009672 -0.020909
v 0.021719 0.018939 -0.015208
v -0.016684 -0.038612 -0.014735
v -0.017468 -0.029657 -0.017468
v -0.015357 -0.037747 -0.016760
v -0.015748 -0.040752 -0.016497
v -0.015913 -0.047431 -0.015913
v -0.017109 -0.033753 0.015516
v -0.018018 -0.023370 0.018018
v -0.018512 -0.017718 0.018512
v -0.016177 -0.044411 0.016177
v -0.015748 -0.049313 0.015748
v -0.015748 -0.049313 -0.015748
v -0.019675 -0.004427 0.016381
v -0.020909 0.009672 -0.020909
v -0.020741 0.007752 0.020741
v -0.021719 0.018939 0.015208
v -0.020909 0.009672 0.020909
v -0.018512 -0.003302 0.019773
v 0.020560 0.005685 0.020560
v 0.015208 0.018939 0.021719
v 0.017174 -0.008451 0.019323
v 0.018163 -0.021714 0.018163
v -0.016177 -0.030600 0.017385
v 0.015748 -0.049313 0.015748
v 0.020909 0.009672 0.020909
v 0.019672 -0.004460 0.017730
v 0.020488 0.004867 -0.020488
v 0.019075 -0.011285 -0.016746
v 0.016094 -0.045364 -0.016094
v 0.015748 -0.049313 -0.015748
v 0.017187 -0.010187 -0.019171
vt 0.0000 0.0000
vt -0.0148 0.1172
vt -0.0221 0.1025
vt 0.0000 0.0000
vt -0.0100 0.0907
vt -0.0085 -0.0141
vt -0.0000 0.0000
vt -0.0729 -0.1433
vt 0.1875 -0.3687
vt -0.1099 -0.2268
vt -0.1696 -0.4763
vt -0.1677 -0.3298
vt -0.1875 -0.3687
vt 0.0165 -0.0925
vt -0.0000 0.0000
vt -0.0076 -0.0836
vt -0.0199 -0.0214
vt -0.0000 0.0000
vt -0.0242 0.0087
vt -0.0140 -0.0882
vt -0.0200 -0.0214
vt -0.3048 0.1074
vt -0.0023 0.1562
vt -0.3322 0.1973
vt 0.0227 0.2604
vt 0.0276 0.3172
vt 0.0043 0.0492
vt -0.3166 0.0189
vt 0.0000 0.0000
vt -0.3150 0.0000
vt 0.0063 0.4506
vt -0.3666 0.5921
vt 0.0499 0.5728
vt -0.0054 0.6851
vt 0.0516 0.5921
vt -0.0003 -0.1132
vt -0.0000 0.0000
vt -0.0360 -0.1247
vt -0.0119 -0.1442
vt -0.0000 0.0000
vt -0.0359 -0.0113
vt -0.3426 0.4619
vt 0.0481 0.5521
vt -0.3649 0.5728
vt -0.0054 0.6851
vt -0.3666 0.5921
vt 0.0143 0.4102
vt -0.3426 0.3172
vt 0.0241 0.2770
vt -0.3377 0.2604
vt -0.3192 0.1878
vt 0.0000 0.0000
vt -0.3192 0.0492
vt -0.3150 0.0000
vt 0.0516 0.5921
vt 0.0093 -0.0743
vt -0.0000 0.0000
vt -0.0102 -0.1067
vt -0.0104 -0.1382
vt -0.0000 0.0000
vt -0.0208 -0.0316
vt 0.0000 0.0000
vt 0.0149 0.1726
vt -0.0147 0.1327
vt 0.0000 0.0000
vt -0.0166 0.1044
vt -0.0280 -0.0411
vt -0.3348 0.4502
vt 0.0474 0.5439
vt -0.3631 0.5521
vt -0.0054 0.6851
vt -0.3666 0.5921
vt 0.0100 0.3817
vt -0.3391 0.2770
vt 0.0035 0.0396
vt -0.3150 0.0000
vt 0.0000 0.0000
vt 0.0516 0.5921
vt 0.0000 0.0000
vt 0.0168 0.3529
vt -0.0139 0.3419
vt 0.0000 0.0000
vt -0.0126 0.1542
vt -0.0306 -0.0113
vt 0.0000 0.0859
vt -0.0039 0.1161
vt -0.3184 0.0396
vt 0.0172 0.1973
vt -0.3293 0.3928
vt 0.0516 0.5921
vt -0.3624 0.5439
vt -0.0054 0.6851
vt -0.3666 0.5921
vt 0.0016 0.0189
vt -0.3150 0.0000
vt 0.0000 0.0000
vt -0.1696 -0.4763
vt 0.1875 -0.3687
vt -0.1875 -0.3687
vt -0.1696 -0.4763
vt 0.1875 -0.3687
vt -0.1875 -0.3687
vt 0.0729 -0.1433
vt -0.1875 -0.3687
vt 0.1141 -0.2397
vt -0.1696 -0.4763
vt 0.1677 -0.3298
vt 0.1875 -0.3687
vt 0.1575 0.1575
vt -0.1575 0.1575
vt 0.1575 -0.1575
vt -0.1575 -0.1575
usemtl wire_191191191.001
s 1
f 1/1 2/2 3/3
f 2/4 4/5 3/6
f 5/7 4/8 6/9
f 6/9 4/8 2/10
f 6/9 2/10 7/11
f 7/11 2/10 1/12
f 7/11 1/12 8/13
f 9/14 10/15 11/16
f 12/17 9/18 11/19
f 13/20 9/18 12/21
f 9/22 14/23 10/24
f 10/24 14/23 15/25
f 10/24 15/25 16/26
f 14/23 9/22 17/27
f 17/27 9/22 13/28
f 17/27 13/28 18/29
f 18/29 13/28 19/30
f 16/26 20/31 10/24
f 10/24 20/31 21/32
f 21/32 20/31 22/33
f 21/32 22/33 23/34
f 23/34 22/33 24/35
f 25/36 22/37 20/38
f 16/39 25/40 20/41
f 25/42 26/43 22/44
f 22/44 26/43 27/45
f 22/44 27/45 24/46
f 26/43 25/42 28/47
f 28/47 25/42 16/48
f 28/47 16/48 29/49
f 29/49 16/48 15/50
f 29/49 15/50 30/51
f 29/49 30/51 31/52
f 31/52 30/51 17/53
f 31/52 17/53 18/54
f 26/43 32/55 27/45
f 30/56 15/57 14/58
f 17/59 30/60 14/61
f 29/62 33/63 28/64
f 33/65 26/66 28/67
f 33/68 34/69 26/70
f 26/70 34/69 8/71
f 26/70 8/71 32/72
f 34/69 33/68 35/73
f 35/73 33/68 29/74
f 35/73 29/74 36/75
f 36/75 29/74 31/76
f 36/75 31/76 37/77
f 34/69 7/78 8/71
f 36/79 38/80 35/81
f 38/82 34/83 35/84
f 12/85 11/86 36/87
f 36/87 11/86 10/88
f 36/87 10/88 38/89
f 38/89 10/88 21/90
f 38/89 21/90 34/91
f 34/91 21/90 6/92
f 34/91 6/92 7/93
f 12/85 36/87 13/94
f 13/94 36/87 37/95
f 13/94 37/95 19/96
f 21/97 23/98 6/99
f 6/99 23/98 5/7
f 24/100 27/101 23/102
f 23/102 27/101 5/7
f 4/103 27/104 3/105
f 3/105 27/104 32/106
f 3/105 32/106 1/107
f 1/107 32/106 8/108
f 4/103 5/7 27/104
f 31/109 18/110 37/111
f 37/111 18/110 19/112

View file

@ -0,0 +1,198 @@
# Blender v2.77 (sub 0) OBJ File: ''
# www.blender.org
mtllib crystal_shape02.mtl
o Crystal_Taya2.000
v 0.006739 0.025244 0.012075
v 0.001956 0.043504 0.004196
v 0.004129 0.024144 0.013098
v 0.011672 0.002214 0.025031
v 0.000000 0.051819 0.000000
v 0.026389 -0.000477 -0.012306
v 0.023148 -0.023541 0.023148
v 0.012306 -0.000477 0.026389
v 0.023266 -0.013100 -0.018731
v 0.024664 -0.012754 -0.016476
v 0.023359 -0.022037 -0.022441
v -0.006315 0.024980 -0.013543
v -0.008197 0.010863 -0.020143
v 0.023148 -0.023541 -0.023148
v -0.011933 0.001106 -0.025590
v -0.012306 -0.000477 -0.026389
v -0.010407 0.010810 -0.018614
v -0.018415 0.015325 0.008587
v -0.009799 0.031187 0.003172
v -0.001187 0.049467 0.000554
v -0.023148 -0.023541 -0.023148
v -0.026389 -0.000477 0.012306
v -0.009284 0.030199 0.005679
v -0.023148 -0.023541 0.023148
v -0.019685 -0.048181 -0.019685
v 0.019685 -0.048181 -0.019685
v 0.019685 -0.048181 0.019685
v -0.019685 -0.048181 0.019685
vt 0.0323 -0.2020
vt -0.0000 0.0000
vt 0.0048 -0.2141
vt 0.0306 -0.2671
vt -0.0000 0.0000
vt -0.0273 -0.0128
vt 0.0000 0.0000
vt -0.0327 -0.0894
vt 0.2059 -0.5620
vt -0.0904 -0.2856
vt -0.1383 -0.8099
vt -0.1953 -0.5331
vt -0.2059 -0.5620
vt 0.0710 -0.1265
vt -0.0000 0.0000
vt 0.0445 -0.1230
vt 0.0304 -0.0919
vt -0.0000 0.0000
vt -0.0265 0.0036
vt -0.2059 -0.5620
vt 0.1057 -0.2884
vt -0.1546 -0.6977
vt 0.1459 -0.4402
vt -0.1383 -0.8099
vt 0.1997 -0.5450
vt 0.2059 -0.5620
vt -0.1428 -0.7937
vt 0.0000 0.0000
vt 0.0280 0.1172
vt 0.0012 0.1178
vt 0.0000 0.0000
vt -0.0042 0.1559
vt -0.0269 0.0006
vt -0.1393 -0.4407
vt 0.1437 -0.3922
vt -0.1057 -0.2884
vt 0.0633 -0.2217
vt 0.0093 -0.0253
vt -0.1383 -0.8099
vt -0.1997 -0.5450
vt -0.2059 -0.5620
vt 0.2059 -0.5620
vt 0.0000 0.0000
vt 0.0137 0.1764
vt -0.0111 0.1881
vt 0.0000 0.0000
vt -0.0163 0.2146
vt -0.0251 0.0110
vt 0.0327 -0.0894
vt -0.0678 -0.2324
vt 0.0836 -0.2974
vt -0.1437 -0.3922
vt -0.1383 -0.8099
vt -0.2059 -0.5620
vt -0.0093 -0.0253
vt 0.2059 -0.5620
vt 0.1953 -0.5331
vt -0.0738 0.4817
vt -0.4283 0.2488
vt 0.0346 0.2488
vt 0.0000 0.0000
vt -0.3937 0.0000
vt -0.0738 0.4817
vt -0.4283 0.2488
vt -0.0321 0.3577
vt 0.0276 0.2640
vt 0.0346 0.2488
vt 0.0000 0.0000
vt -0.3937 0.0000
vt -0.0738 0.4817
vt -0.4283 0.2488
vt 0.0346 0.2488
vt 0.0000 0.0000
vt -0.3937 0.0000
vt -0.0738 0.4817
vt -0.4283 0.2488
vt 0.0346 0.2488
vt 0.0000 0.0000
vt -0.3937 0.0000
vt 0.1969 0.1969
vt -0.1969 0.1969
vt 0.1969 -0.1969
vt -0.1969 -0.1969
vn 0.1681 0.4273 0.8883
vn 0.1213 0.5063 0.8538
vn 0.8744 0.3663 0.3183
vn 0.8744 0.3663 0.3182
vn 0.8745 0.3664 0.3178
vn 0.8439 0.0624 -0.5328
vn 0.8105 0.2318 -0.5380
vn 0.3182 0.3663 -0.8744
vn 0.3183 0.3663 -0.8744
vn 0.3181 0.3663 -0.8744
vn -0.4802 0.5605 -0.6747
vn -0.5239 0.4171 -0.7427
vn -0.8744 0.3663 -0.3182
vn -0.8744 0.3663 -0.3183
vn -0.8744 0.3663 -0.3181
vn -0.7587 0.5377 0.3678
vn -0.8295 0.4401 0.3438
vn -0.3182 0.3663 0.8744
vn -0.3183 0.3663 0.8744
vn -0.3181 0.3663 0.8744
vn -0.3180 0.3664 0.8744
vn -0.3181 0.3664 0.8744
vn 0.0000 -0.1392 -0.9903
vn 0.9903 -0.1391 0.0000
vn 0.9903 -0.1392 0.0000
vn 0.9903 -0.1390 -0.0000
vn 0.0000 -0.1392 0.9903
vn -0.9903 -0.1392 -0.0000
vn 0.0000 -1.0000 -0.0000
usemtl wire_191191191.000
s 1
f 1/1/1 2/2/1 3/3/1
f 4/4/2 1/5/2 3/6/2
f 5/7/3 2/8/3 6/9/4
f 6/9/4 2/8/3 1/10/4
f 6/9/4 1/10/4 7/11/4
f 7/11/4 1/10/4 4/12/4
f 7/11/4 4/12/4 8/13/5
f 9/14/6 6/15/6 10/16/6
f 11/17/7 9/18/7 10/19/7
f 5/7/8 6/20/8 12/21/8
f 12/21/8 6/20/8 9/22/8
f 12/21/8 9/22/8 13/23/8
f 13/23/8 9/22/8 14/24/9
f 13/23/8 14/24/9 15/25/8
f 15/25/8 14/24/9 16/26/8
f 9/22/8 11/27/10 14/24/9
f 15/28/11 17/29/11 13/30/11
f 17/31/12 12/32/12 13/33/12
f 17/34/13 18/35/13 12/36/14
f 12/36/14 18/35/13 19/37/14
f 12/36/14 19/37/14 20/38/13
f 18/35/13 17/34/13 21/39/13
f 21/39/13 17/34/13 15/40/13
f 21/39/13 15/40/13 16/41/15
f 21/39/13 22/42/13 18/35/13
f 20/38/13 5/7/13 12/36/14
f 18/43/16 23/44/16 19/45/16
f 23/46/17 20/47/17 19/48/17
f 2/49/18 23/50/19 3/51/19
f 3/51/19 23/50/19 18/52/18
f 3/51/19 18/52/18 24/53/18
f 24/53/18 18/52/18 22/54/20
f 5/7/21 20/55/22 2/49/18
f 2/49/18 20/55/22 23/50/19
f 8/56/18 4/57/18 24/53/18
f 24/53/18 4/57/18 3/51/19
f 16/58/23 14/59/23 21/60/23
f 21/60/23 14/59/23 25/61/23
f 25/61/23 14/59/23 26/62/23
f 6/63/24 7/64/25 10/65/25
f 10/65/25 7/64/25 11/66/26
f 11/66/26 7/64/25 14/67/24
f 14/67/24 7/64/25 26/68/25
f 26/68/25 7/64/25 27/69/25
f 8/70/27 24/71/27 7/72/27
f 7/72/27 24/71/27 27/73/27
f 27/73/27 24/71/27 28/74/27
f 22/75/28 21/76/28 24/77/28
f 24/77/28 21/76/28 28/78/28
f 28/78/28 21/76/28 25/79/28
f 27/80/29 28/81/29 26/82/29
f 26/82/29 28/81/29 25/83/29

311
mods/other_worlds/nodes.lua Normal file
View file

@ -0,0 +1,311 @@
-- Asteroid nodes
core.register_node(":asteroid:stone", {
description = "Asteroid Stone",
tiles = {"default_stone.png"},
is_ground_content = false,
drop = 'asteroid:cobble',
groups = {cracky = 3, stone = 1, not_in_creative_inventory = 1},
sounds = default.node_sound_stone_defaults()
})
core.register_node(":asteroid:redstone", {
description = "Asteroid Stone",
tiles = {"asteroid_redstone.png"},
is_ground_content = false,
drop = 'asteroid:redcobble',
groups = {cracky = 3, stone = 1},
sounds = default.node_sound_stone_defaults()
})
core.register_node(":asteroid:cobble", {
description = "Asteroid Cobble",
tiles = {"asteroid_cobble.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 2},
sounds = default.node_sound_stone_defaults()
})
core.register_node(":asteroid:redcobble", {
description = "Asteroid Cobble",
tiles = {"asteroid_redcobble.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 2},
sounds = default.node_sound_stone_defaults()
})
core.register_node(":asteroid:gravel", {
description = "Asteroid Gravel",
tiles = {"asteroid_gravel.png"},
is_ground_content = false,
groups = {crumbly = 2},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_gravel_footstep", gain = 0.2}
})
})
core.register_node(":asteroid:redgravel", {
description = "Asteroid Gravel",
tiles = {"asteroid_redgravel.png"},
is_ground_content = false,
groups = {crumbly = 2},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_gravel_footstep", gain = 0.2}
})
})
core.register_node(":asteroid:dust", {
description = "Asteroid Dust",
tiles = {"asteroid_dust.png"},
is_ground_content = false,
groups = {crumbly = 3},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_gravel_footstep", gain = 0.1}
})
})
core.register_node(":asteroid:reddust", {
description = "Asteroid Dust",
tiles = {"asteroid_reddust.png"},
is_ground_content = false,
groups = {crumbly = 3},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_gravel_footstep", gain = 0.1}
})
})
core.register_node(":asteroid:ironore", {
description = "Asteroid Iron Ore",
tiles = {"asteroid_redstone.png^default_mineral_iron.png"},
is_ground_content = false,
groups = {cracky = 2},
drop = "default:iron_lump",
sounds = default.node_sound_stone_defaults()
})
core.register_node(":asteroid:copperore", {
description = "Asteroid Copper Ore",
tiles = {"asteroid_redstone.png^default_mineral_copper.png"},
is_ground_content = false,
groups = {cracky = 2},
drop = "default:copper_lump",
sounds = default.node_sound_stone_defaults()
})
core.register_node(":asteroid:goldore", {
description = "Asteroid Gold Ore",
tiles = {"asteroid_redstone.png^default_mineral_gold.png"},
is_ground_content = false,
groups = {cracky = 2},
drop = "default:gold_lump",
sounds = default.node_sound_stone_defaults()
})
core.register_node(":asteroid:diamondore", {
description = "Asteroid Diamond Ore",
tiles = {"asteroid_redstone.png^default_mineral_diamond.png"},
is_ground_content = false,
groups = {cracky = 1},
drop = "default:diamond",
sounds = default.node_sound_stone_defaults()
})
core.register_node(":asteroid:meseore", {
description = "Asteroid Mese Ore",
tiles = {"asteroid_redstone.png^default_mineral_mese.png"},
is_ground_content = false,
groups = {cracky = 1},
drop = "default:mese_crystal",
sounds = default.node_sound_stone_defaults()
})
core.register_node(":asteroid:atmos", {
description = "Comet Atmosphere",
drawtype = "glasslike",
tiles = {"asteroid_atmos.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
use_texture_alpha = "blend",
post_effect_color = {a = 31, r = 241, g = 248, b = 255},
groups = {not_in_creative_inventory = 1},
drop = {}
})
-- Redsky plant nodes
core.register_node(":mars:redgrass", {
description = "Red Grass",
drawtype = "plantlike",
waving = 1,
visual_scale = 1.3,
tiles = {"mars_redgrass.png"},
inventory_image = "mars_redgrass.png",
wield_image = "mars_redgrass.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flora = 1, attached_node = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
}
})
core.register_node(":mars:redweed", {
description = "Red Weed",
drawtype = "plantlike",
waving = 1,
visual_scale = 1.3,
tiles = {"mars_redweed.png"},
inventory_image = "mars_redweed.png",
wield_image = "mars_redweed.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flora = 1, attached_node = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
}
})
core.register_node(":mars:moss", {
description = "Martian Moss",
drawtype = "nodebox",
tiles = {"mars_moss.png"},
inventory_image = "mars_moss.png",
wield_image = "mars_moss.png",
paramtype = "light",
paramtype2 = "facedir",
use_texture_alpha = "clip",
sunlight_propagates = true,
walkable = false,
node_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, -15/32, 1/2},
},
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, -15/32, 1/2},
},
groups = {snappy = 3, flora = 1, attached_node = 1},
sounds = default.node_sound_leaves_defaults()
})
-- mars grass
core.register_node(":mars:grass_1", {
description = "Martian Grass",
drawtype = "plantlike",
waving = 1,
tiles = {"mars_grass_1.png"},
inventory_image = "mars_grass_3.png",
wield_image = "mars_grass_3.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flora = 1, attached_node = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
},
on_place = function(itemstack, placer, pointed_thing)
-- place a random grass node
local stack = ItemStack("mars:grass_" .. math.random(5))
local ret = core.item_place(stack, placer, pointed_thing)
return ItemStack("mars:grass_1 "
.. itemstack:get_count() - (1 - ret:get_count()))
end
})
for i = 2, 5 do
core.register_node(":mars:grass_" .. i, {
description = "Martian Grass",
drawtype = "plantlike",
waving = 1,
tiles = {"mars_grass_" .. i .. ".png"},
inventory_image = "mars_grass_" .. i .. ".png",
wield_image = "mars_grass_" .. i .. ".png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = "mars:grass_1",
groups = {
snappy = 3, flora = 1, attached_node = 1,
not_in_creative_inventory = 1
},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
}
})
end
-- Crystals
local sbox = {
type = "fixed",
fixed = {-5/16, -8/16, -6/16, 5/16, -1/32, 5/16}}
local crystal_list = {
{"ghost_crystal", "ghost_crystal.png"},
{"red_crystal", "red_crystal.png"},
{"rose_quartz", "rose_quartz.png"}}
for i = 1, #crystal_list do -- in ipairs(crystal_list) do
local name = crystal_list[i][1]
local texture = crystal_list[i][2]
core.register_node(":crystals:" .. name .. "_1", {
description = "Glowing Crystal",
drawtype = "mesh",
mesh = "crystal_shape01.obj",
tiles = {"crystals_" .. texture},
wield_scale = {x = 7, y = 7, z = 7},
paramtype = "light",
paramtype2 = "facedir",
selection_box = sbox,
walkable = false,
light_source = 10,
use_texture_alpha = "blend",
visual_scale = 10,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
})
core.register_node(":crystals:" .. name .. "_2", {
description = "Glowing Crystal",
drawtype = "mesh",
mesh = "crystal_shape02.obj",
tiles = {"crystals_" .. texture},
wield_scale = {x = 7, y = 7, z = 7},
paramtype = "light",
paramtype2 = "facedir",
selection_box = sbox,
walkable = false,
light_source = 10,
use_texture_alpha = "blend",
visual_scale = 10,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
})
end

View file

@ -0,0 +1,72 @@
-- Approximate realm limits
local YMIN = otherworlds.settings.redsky_asteroids.YMIN or 6000
local YMAX = otherworlds.settings.redsky_asteroids.YMAX or 7000
-- Register on_generated function for this layer
core.register_on_generated(
otherworlds.asteroids.create_on_generated(YMIN, YMAX, {
c_air = core.get_content_id("air"),
c_obsidian = core.get_content_id("default:obsidian"),
c_stone = core.get_content_id("asteroid:redstone"),
c_cobble = core.get_content_id("air"),
c_gravel = core.get_content_id("asteroid:redgravel"),
c_dust = core.get_content_id("asteroid:reddust"),
c_ironore = core.get_content_id("asteroid:ironore"),
c_copperore = core.get_content_id("asteroid:copperore"),
c_goldore = core.get_content_id("asteroid:goldore"),
c_diamondore = core.get_content_id("asteroid:diamondore"),
c_meseore = core.get_content_id("asteroid:meseore"),
c_waterice = core.get_content_id("default:ice"),
c_atmos = core.get_content_id("asteroid:atmos"),
c_snowblock = core.get_content_id("default:snowblock")
}))
-- Deco code for grass and crystal
local TOPDECO = 500 -- how often deco appears on top of asteroid cobble
local grass = {
"mars:grass_1", "mars:grass_2", "mars:grass_3", "mars:grass_4", "mars:grass_5"}
local flower = {"mars:moss", "mars:redweed", "mars:redgrass"}
local crystal = {
"crystals:ghost_crystal_1", "crystals:ghost_crystal_2",
"crystals:red_crystal_1", "crystals:red_crystal_2",
"crystals:rose_quartz_1", "crystals:rose_quartz_2"}
local random = math.random
-- Add surface decoration
core.register_on_generated(function(minp, maxp)
if minp.y < YMIN or maxp.y > YMAX then return end
local bpos, ran
local coal = core.find_nodes_in_area_under_air(minp, maxp, {"asteroid:redgravel"})
for n = 1, #coal do
bpos = {x = coal[n].x, y = coal[n].y + 1, z = coal[n].z}
ran = random(TOPDECO)
if ran < 100 then -- grass
core.swap_node(bpos, {name = grass[random(#grass)]})
elseif ran >= 180 and ran <= 200 then -- other plants
core.swap_node(bpos, {name = flower[random(#flower)]})
elseif ran == TOPDECO then -- crystals
core.swap_node(bpos, {name = crystal[random(#crystal)]})
end
end
end)

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View file

@ -0,0 +1,45 @@
otherworlds.settings = {}
-- general
otherworlds.settings.crafting = {
-- set to false to remove crafting recipes
enable = core.settings:get_bool("otherworlds.crafting", true)
}
-- space_asteroids
otherworlds.settings.space_asteroids = {
-- set to false to prevent space mapgen
enable = core.settings:get_bool("otherworlds.space", true),
-- minimum height of space layer
YMIN = tonumber(core.settings:get("otherworlds.space.ymin") or 20000),
-- maximum height for space layer
YMAX = tonumber(core.settings:get("otherworlds.space.ymax") or 25000)
}
-- redsky_asteroids
otherworlds.settings.redsky_asteroids = {
-- set to false to prevent redsky mapgen
enable = core.settings:get_bool("otherworlds.redsky", true),
-- minimum height of redsky layer
YMIN = tonumber(core.settings:get("otherworlds.redsky.ymin") or 25000),
-- maximum height for redsky layer
YMAX = tonumber(core.settings:get("otherworlds.redsky.ymax") or 30000)
}
-- gravity
otherworlds.settings.gravity = {
-- set to true to enable gravity
enable = core.settings:get_bool("otherworlds.gravity", false)
}
-- increase or decrease change of ores appearing in asteroids
otherworlds.settings.ore_chance = {
-- default ore chance is multiplied by following value
value = tonumber(core.settings:get("otherworlds.ore_chance") or 27)
}

View file

@ -0,0 +1,13 @@
otherworlds.crafting (Enable crafting recipes) bool true
otherworlds.space (Enable Space asteroids) bool true
otherworlds.space.ymin (Space asteroid min height) int 20000
otherworlds.space.ymax (Space asteroid max height) int 25000
otherworlds.redsky (Enable Redsky asteroids) bool true
otherworlds.redsky.ymin (Redsky asteroid min height) int 25000
otherworlds.redsky.ymax (Redsky asteroid max height) int 31000
otherworlds.gravity (Enable gravity) bool false
otherworlds.ore_chance (Chance of finding ores) int 27

View file

@ -0,0 +1,220 @@
-- Heights for skyboxes
local underground_low = -31000
local underground_high = -50
local space_low = 5000
local space_high = 5999
local redsky_low = 6000
local redsky_high = 6999
local nether_low = -32000
local nether_high = -31000
-- Nether check
local mod_nether = core.get_modpath("nether")
if mod_nether then
nether_low = nether.DEPTH_FLOOR or -32000
nether_high = nether.DEPTH_CEILING or -31000
underground_low = nether_high
if core.get_modpath("climate_api") then
mod_nether = nil -- remove nether skybox for climate_api version
end
end
-- Holds name of skybox showing for each player
local player_list = {}
-- Outerspace skybox
local spaceskybox = {
"sky_pos_z.png",
"sky_neg_z.png^[transformR180",
"sky_neg_y.png^[transformR270",
"sky_pos_y.png^[transformR270",
"sky_pos_x.png^[transformR270",
"sky_neg_x.png^[transformR90"}
-- Redsky skybox
local redskybox = {
"sky_pos_z.png^[colorize:#99000050",
"sky_neg_z.png^[transformR180^[colorize:#99000050",
"sky_neg_y.png^[transformR270^[colorize:#99000050",
"sky_pos_y.png^[transformR270^[colorize:#99000050",
"sky_pos_x.png^[transformR270^[colorize:#99000050",
"sky_neg_x.png^[transformR90^[colorize:#99000050"}
-- Darkest space skybox
local darkskybox = {
"sky_pos_z.png^[colorize:#00005070",
"sky_neg_z.png^[transformR180^[colorize:#00005070",
"sky_neg_y.png^[transformR270^[colorize:#00005070",
"sky_pos_y.png^[transformR270^[colorize:#00005070",
"sky_pos_x.png^[transformR270^[colorize:#00005070",
"sky_neg_x.png^[transformR90^[colorize:#00005070"}
-- check for active pova mod
local mod_pova = core.get_modpath("pova")
-- gravity helper function
local function set_gravity(player, grav)
if mod_pova then
pova.add_override(player:get_player_name(), "default", {gravity = grav})
else
player:set_physics_override({gravity = grav})
end
end
-- globalstep function runs every 2 seconds to show appropriate skybox
local timer, timer2 = 0, 0
core.register_globalstep(function(dtime)
timer = timer + dtime ; if timer < 2 then return end ; timer = 0
timer2 = timer2 + 2
local name, pos, current
for _, player in pairs(core.get_connected_players()) do
name = player:get_player_name()
pos = player:get_pos()
current = player_list[name] or ""
-- this just adds nether background outwith climate_api mod
if mod_nether and pos.y >= nether_low and pos.y <= nether_high
and (current ~= "nether" or (current == "nether" and timer2 > 6)) then
timer2 = 0 -- reset nether layer timer (every 10 seconds)
local base_col = current ~= "nether" and "#1D0504"
local ps, cn = core.find_nodes_in_area(
{x = pos.x - 6, y = pos.y - 6, z = pos.z - 6},
{x = pos.x + 6, y = pos.y + 6, z = pos.z + 6},
{"nether:rack", "nether:rack_deep", "nether:geode", "nether:geodelite"})
-- easy find nether layer via quick node count
if (cn["nether:rack"] or 0) > 100 then
base_col = "#1D0504"
elseif (cn["nether:rack_deep"] or 0) > 100 then
base_col = "#070916"
elseif (cn["nether:geode"] or 0) + (cn["nether:geodelite"] or 0)> 100 then
base_col = "#300530"
end
if base_col then
player:set_sky({type = "plain", base_color = base_col, clouds = false})
end
player:set_moon({visible = false})
player:set_stars({visible = false})
player:set_sun({visible = false, sunrise_visible = false})
player_list[name] = "nether"
if otherworlds.settings.gravity.enable then
set_gravity(player, 1.05)
end
-- Underground (above Nether limit)
elseif pos.y >= underground_low and pos.y <= underground_high
and current ~= "underground" then
player:set_sky({type = "plain", clouds = false, base_color = "#101010"})
player:set_moon({visible = false})
player:set_stars({visible = false})
player:set_sun({visible = false, sunrise_visible = false})
player_list[name] = "underground"
if otherworlds.settings.gravity.enable then
set_gravity(player, 1.0)
end
-- Earth
elseif pos.y > underground_high and pos.y < space_low
and current ~= "earth" then
player:set_sky({type = "regular", clouds = true})
player:set_moon({visible = true})
player:set_stars({visible = true})
player:set_sun({visible = true, scale = 1.0, sunrise_visible = true})
player_list[name] = "earth"
if otherworlds.settings.gravity.enable then
set_gravity(player, 1.0)
end
-- Outerspace
elseif pos.y >= space_low and pos.y <= space_high
and current ~= "space" then
player:set_sky({type = "skybox", textures = spaceskybox, clouds = false,
base_color = "#000000"})
player:set_moon({visible = false})
player:set_stars({visible = false})
player:set_sun({visible = true, scale = 1.0, sunrise_visible = false})
player_list[name] = "space"
if otherworlds.settings.gravity.enable then
set_gravity(player, 0.4)
end
-- Redsky
elseif pos.y >= redsky_low and pos.y <= redsky_high
and current ~= "redsky" then
player:set_sky({type = "skybox", textures = redskybox, clouds = false,
base_color = "#000000"})
player:set_moon({visible = false})
player:set_stars({visible = false})
player:set_sun({visible = true, scale = 0.5, sunrise_visible = false})
player_list[name] = "redsky"
if otherworlds.settings.gravity.enable then
set_gravity(player, 0.2)
end
-- Everything else above (the blackness)
elseif pos.y > redsky_high and current ~= "blackness" then
player:set_sky({type = "skybox", textures = darkskybox, clouds = false,
base_color = "#000000"})
player:set_moon({visible = false})
player:set_stars({visible = true})
player:set_sun({visible = true, scale = 0.1, sunrise_visible = false})
player_list[name] = "blackness"
if otherworlds.settings.gravity.enable then
set_gravity(player, 0.1)
end
end
end
end)
-- remove player from list when they leave
core.register_on_leaveplayer(function(player)
player_list[player:get_player_name()] = nil
end)

View file

@ -0,0 +1,26 @@
-- Approximate realm limits
local YMIN = otherworlds.settings.space_asteroids.YMIN or 5000
local YMAX = otherworlds.settings.space_asteroids.YMAX or 6000
-- Register on_generated function for this layer
core.register_on_generated(
otherworlds.asteroids.create_on_generated(YMIN, YMAX, {
c_air = core.get_content_id("air"),
c_obsidian = core.get_content_id("default:obsidian"),
c_stone = core.get_content_id("asteroid:stone"),
c_cobble = core.get_content_id("asteroid:cobble"),
c_gravel = core.get_content_id("asteroid:gravel"),
c_dust = core.get_content_id("asteroid:dust"),
c_ironore = core.get_content_id("default:stone_with_iron"),
c_copperore = core.get_content_id("default:stone_with_copper"),
c_goldore = core.get_content_id("default:stone_with_gold"),
c_diamondore = core.get_content_id("default:stone_with_diamond"),
c_meseore = core.get_content_id("default:stone_with_mese"),
c_waterice = core.get_content_id("default:ice"),
c_atmos = core.get_content_id("asteroid:atmos"),
c_snowblock = core.get_content_id("default:snowblock")
}))

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB