SussyCraft/mods/amogus_generator/init.lua

553 lines
14 KiB
Lua
Raw Normal View History

2023-01-31 05:45:15 +01:00
minetest.register_alias("mapgen_stone", "amogus_blocks:stone")
minetest.register_alias("mapgen_dirt", "amogus_blocks:dirt")
minetest.register_alias("mapgen_water_source", "amogus_blocks:water_source")
2023-01-26 13:52:37 +01:00
minetest.register_biome({
name = "amogus_beach",
node_top = "amogus_blocks:sand",
depth_top = 1,
node_filler = "amogus_blocks:sand",
depth_filler = 3,
node_stone = "amogus_blocks:stone",
--node_water_top = "amogus_blocks:water",
--depth_water_top = 1,
node_water = "amogus_blocks:amogus_blocks:water_source",
--node_river_water = "amogus_blocks:water",
2023-01-26 13:52:37 +01:00
y_max = 6,
y_min = -5,
heat_point = 50,
humidity_point = 50,
})
minetest.register_biome({
2023-01-31 05:45:15 +01:00
name = "amogus_green_biome",
--node_dust = "amogus_blocks:stone",
2023-01-31 05:45:15 +01:00
node_top = "amogus_blocks:grass_green",
depth_top = 1,
node_filler = "amogus_blocks:dirt",
depth_filler = 1,
node_stone = "amogus_blocks:stone",
--node_water_top = "amogus_blocks:water",
--depth_water_top = 1,
node_water = "amogus_blocks:amogus_blocks:water_source",
--node_river_water = "amogus_blocks:water",
y_max = 31000,
y_min = 1,
2023-01-31 05:45:15 +01:00
heat_point = 100,
humidity_point = 100,
})
2023-01-24 22:22:14 +01:00
minetest.register_biome({
2023-01-31 05:45:15 +01:00
name = "amogus_biome",
2023-01-24 22:22:14 +01:00
--node_dust = "amogus_blocks:stone",
2023-01-31 05:45:15 +01:00
node_top = "amogus_blocks:grass",
2023-01-24 22:22:14 +01:00
depth_top = 1,
node_filler = "amogus_blocks:dirt",
depth_filler = 1,
node_stone = "amogus_blocks:stone",
--node_water_top = "amogus_blocks:water",
--depth_water_top = 1,
node_water = "amogus_blocks:amogus_blocks:water_source",
--node_river_water = "amogus_blocks:water",
2023-01-24 22:22:14 +01:00
y_max = 31000,
y_min = 1,
2023-01-31 05:45:15 +01:00
heat_point = 50,
humidity_point = 50,
2023-01-24 22:22:14 +01:00
})
2023-01-31 05:45:15 +01:00
minetest.register_ore({
ore_type = "scatter",
ore = "amogus_blocks:sussium_ore",
wherein = "amogus_blocks:stone",
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 1,
clust_size = 1,
y_max = 31000,
y_min = -31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "amogus_blocks:gold_ore",
wherein = "amogus_blocks:stone",
clust_scarcity = 8 * 8 * 8,
2023-01-30 07:24:03 +01:00
clust_num_ores = 1,
clust_size = 1,
y_max = 31000,
y_min = -31000,
})
minetest.register_ore({
2023-01-30 07:24:03 +01:00
ore_type = "scatter",
ore = "amogus_blocks:obsusian",
wherein = "amogus_blocks:stone",
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 1,
clust_size = 1,
y_max = 31000,
y_min = -31000,
})
minetest.register_ore({
2023-02-04 16:17:05 +01:00
ore_type = "scatter",
ore = "amogus_blocks:iron_ore",
wherein = "amogus_blocks:stone",
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 1,
clust_size = 1,
y_max = 31000,
y_min = -31000,
})
2023-02-04 16:17:05 +01:00
minetest.register_decoration({
deco_type = "simple",
place_on = {"amogus_blocks:grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 1234,
octaves = 3,
persist = 0.6
},
biomes = {"amogus_biome"},
y_max = 31000,
y_min = 1,
decoration = "amogus_blocks:lucky_block",
2023-01-27 13:07:56 +01:00
})minetest.register_decoration({
deco_type = "simple",
2023-01-28 11:04:13 +01:00
place_on = {"amogus_blocks:grass_green"},
2023-01-27 13:07:56 +01:00
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 1234,
octaves = 3,
persist = 0.6
},
biomes = {"green_biome"},
y_max = 31000,
y_min = 1,
decoration = "amogus_blocks:lucky_block",
})
2023-01-28 11:04:13 +01:00
minetest.register_decoration({
deco_type = "simple",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"green_biome"},
y_max = 31000,
y_min = 1,
decoration = "amogus_blocks:amogflower",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
fill_ratio = 0.10,
biomes = {"green_biome"},
y_max = 31000,
y_min = 1,
decoration = "amogus_blocks:grass_tall",
})minetest.register_decoration({
deco_type = "simple",
place_on = {"amogus_blocks:grass"},
sidelen = 16,
fill_ratio = 0.10,
biomes = {"amogus_biome"},
y_max = 31000,
y_min = 1,
decoration = "amogus_blocks:purple_grass_tall",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"amogus_blocks:grass"},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"amogus_biome"},
y_max = 31000,
y_min = 1,
decoration = "amogus_blocks:amogflower",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"green_biome"},
y_max = 31000,
y_min = 1,
decoration = "amogus_blocks:redflower",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"green_biome"},
y_max = 31000,
y_min = 1,
decoration = "amogus_blocks:yellowflower",
})
minetest.register_decoration({
2023-01-12 22:51:29 +01:00
deco_type = "simple",
place_on = {"amogus_blocks:grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 4321,
octaves = 3,
persist = 0.6
},
biomes = {"amogus_biome"},
y_max = 31000,
y_min = 1,
decoration = "amogus_blocks:tv",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass"},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"amogus_biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
2023-01-12 22:51:29 +01:00
minetest.register_decoration({
deco_type = "schematic",
2023-01-26 13:42:13 +01:00
place_on = {"amogus_blocks:grass_green"},
2023-01-12 22:51:29 +01:00
sidelen = 16,
fill_ratio = 0.01,
2023-01-26 13:42:13 +01:00
biomes = {"green__biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/green_tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
2023-01-27 13:07:56 +01:00
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"green__biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/green_tree_tall.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
2023-01-26 13:42:13 +01:00
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass","amogus_blocks:grass_green"},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"amogus_biome","green_biome"},
2023-01-12 22:51:29 +01:00
y_max = 31000,
y_min = 1,
schematic = "/schematics/fallen.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass"},
sidelen = 16,
fill_ratio = 0.01,
biomes = {"amogus_biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/treer.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})minetest.register_decoration({
deco_type = "schematic",
2023-01-22 18:26:41 +01:00
place_on = {"amogus_blocks:grass"},
2023-01-12 22:51:29 +01:00
sidelen = 16,
2023-01-22 18:26:41 +01:00
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 4321,
octaves = 3,
persist = 0.6
},
2023-01-12 22:51:29 +01:00
biomes = {"amogus_biome"},
y_max = 31000,
y_min = 1,
2023-01-22 18:26:41 +01:00
schematic = "/schematics/minihouse.mts",
2023-01-12 22:51:29 +01:00
flags = "place_center_x, place_center_z",
rotation = "random",
})
2023-01-26 13:42:13 +01:00
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 4321,
octaves = 3,
persist = 0.6
},
biomes = {"amogus_biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/amogus_statue.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 1234,
octaves = 3,
persist = 0.6
},
biomes = {"amogus_biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/lucky_tree_2.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 1234,
octaves = 3,
persist = 0.6
},
biomes = {"amogus_biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/lucky_tree_1.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 1234,
octaves = 3,
persist = 0.6
},
biomes = {"green_biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/lucky_tree_2.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 1234,
octaves = 3,
persist = 0.6
},
biomes = {"green_biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/lucky_tree_1.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
2023-01-27 13:07:56 +01:00
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 1234,
octaves = 3,
persist = 0.6
},
biomes = {"green_biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/STONE1.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 1234,
octaves = 3,
persist = 0.6
},
biomes = {"green_biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/STONE2.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.0001,
spread = {x = 100, y = 100, z = 100},
seed = 1234,
octaves = 3,
persist = 0.6
},
biomes = {"green_biome"},
y_max = 31000,
y_min = 1,
schematic = "/schematics/STONE3.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
--minetest.register_abm({
-- label = "Spawn random entities",
-- nodenames = {"group:soil", "group:crumbly", "group:choppy", "group:snappy", "group:cracky"},
-- interval = 15,
-- chance = 50,
-- action = function(pos)
-- local r = math.random(1, 500)
-- if r <= 50 then
-- minetest.add_entity({x = pos.x + math.random(-10, 10),
-- y = pos.y + 1,
-- z = pos.z + math.random(-10, 10)}, "amogus_entities:amogus")
-- minetest.sound_play("amogus_sound", {
-- pos = pos,
-- gain = 1.0,
-- max_hear_distance = 5
-- })
2023-01-12 22:51:29 +01:00
-- end
-- end
--})
minetest.register_on_generated(function(minp, maxp, seed)
--local is_newchunk = true
--for , pos in ipairs(minetest.find_nodes_in_area(minp, maxp, "mymod:amogus_spawner")) do
--is_new_chunk = false
-- break
--end
--if is_new_chunk then
for i = 1, math.random(10, 15) do
minetest.add_entity({x = minp.x + math.random(16), y = minp.y + 1, z = minp.z + math.random(16)}, "amogus_entities:amogus")
--minetest.sound_play("amogus_sound", { pos = pos,gain = 1.0,max_hear_distance = 5})
end
--end
2023-01-31 05:45:15 +01:00
end)
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:sand"},
sidelen = 16,
fill_ratio = 0.0001,
y_max = 31000,
y_min = 1,
biomes = {"amogus_beach"},
schematic = "/schematics/sand_house_1.mts",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:sand"},
sidelen = 16,
fill_ratio = 0.0001,
y_max = 31000,
y_min = 1,
biomes = {"amogus_beach"},
schematic = "/schematics/sand_house_2.mts",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:sand"},
sidelen = 16,
fill_ratio = 0.0001,
y_max = 31000,
y_min = 1,
biomes = {"amogus_beach"},
schematic = "/schematics/sand_house_3.mts",
})
minetest.register_decoration({
deco_type = "schematic",
place_on = {"amogus_blocks:grass_green"},
sidelen = 16,
fill_ratio = 0.0001,
y_max = 31000,
y_min = 1,
biomes = {"green_biome"},
schematic = "/schematics/STATUE_GIANT.mts",
})
-- wtf is this??
--minetest.register_on_generated(function(minp, maxp, seed)
-- for x = minp.x, maxp.x do
-- for y = minp.y, maxp.y do
-- for z = minp.z, maxp.z do
-- local p = {x=x, y=y, z=z}
-- if minetest.get_node(p).name == "default:water_source" then
-- minetest.set_node(p, {name="default:water_source", param2=0})
-- end
-- end
-- end
-- end
-- end)