Browse Source

added code

master
Red_King_Cyclops 2 months ago
parent
commit
871b916317
5 changed files with 81 additions and 0 deletions
  1. 1
    0
      depends.txt
  2. 3
    0
      init.lua
  3. 45
    0
      mapgen.lua
  4. 15
    0
      nodes.lua
  5. 17
    0
      sky.lua

+ 1
- 0
depends.txt View File

@@ -0,0 +1 @@
default

+ 3
- 0
init.lua View File

@@ -0,0 +1,3 @@
dofile(minetest.get_modpath("io_moon") .. "/sky.lua")
dofile(minetest.get_modpath("io_moon") .. "/nodes.lua")
dofile(minetest.get_modpath("io_moon") .. "/mapgen.lua")

+ 45
- 0
mapgen.lua View File

@@ -0,0 +1,45 @@
--minetest.clear_registered_ores()
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()

--normal io biome
minetest.register_biome({
name = "io_moon",
--node_dust = "default:gravel",
node_top = "io_moon:ground_rocks",
depth_top = 1,
node_filler = "io_moon:stone",
depth_filler = 3,
node_stone = "io_moon:stone",
node_water_top = "default:lava_source",
depth_water_top = 1 ,
node_water = "default:lava_source",
node_river_water = "default:lava_source",
y_min = -31000,
y_max = 200,
heat_point = 100,
humidity_point = 0,
})

--lava ore
minetest.register_ore({
ore_type = "scatter",
ore = "default:lava_source",
wherein = "io_moon:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 12,
clust_size = 3,
y_min = -31000,
y_max = 31000,
})

minetest.register_ore({
ore_type = "scatter",
ore = "default:lava_source",
wherein = "io_moon:ground_rocks",
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 15,
clust_size = 5,
y_min = -31000,
y_max = 31000,
})

+ 15
- 0
nodes.lua View File

@@ -0,0 +1,15 @@
minetest.register_node("io_moon:stone", {
description = "Io Stone",
tiles = {"io_moon_stone.png"},
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})

minetest.register_node("io_moon:ground_rocks", {
description = "Io Ground Rocks",
tiles = {"io_moon_ground_rocks.png"},
is_ground_content = true,
groups = {crumbly=1, falling_node = 1},
sounds = default.node_sound_gravel_defaults()
})

+ 17
- 0
sky.lua View File

@@ -0,0 +1,17 @@
minetest.register_on_joinplayer(function(player)
minetest.after(0, function()
textures ={
"dark_sky.png",
"dark_sky.png",
"dark_sky.png",
"sky_neg_z.png",
"dark_sky.png",
"dark_sky.png",
}
player:set_sky({r=0, g=0, b=0, a=0},"skybox", textures)
player:set_clouds({density = 0})
player:set_physics_override(1, 0.6, 0.2) -- speed, jump, gravity
end)
end)

Loading…
Cancel
Save