mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
move biomes definition to a json file
This commit is contained in:
parent
d62d66cf85
commit
3784b57eed
10 changed files with 183 additions and 184 deletions
|
|
@ -1,5 +1,3 @@
|
|||
biomes = json.parse(file.read("base:generators/demo.files/biomes.json"))
|
||||
|
||||
function place_structures(x, z, w, d, seed, hmap)
|
||||
local placements = {}
|
||||
for i=1,10 do
|
||||
|
|
@ -41,10 +39,6 @@ end
|
|||
|
||||
function generate_heightmap(x, y, w, h, seed)
|
||||
-- blocks per dot
|
||||
-- 8 - linear interpolation is visible, but not so much
|
||||
-- 4 - high quality, but slower
|
||||
-- 2 - you really don't need it
|
||||
-- 1 - please have mercy on your CPU
|
||||
local bpd = 4
|
||||
local map = _generate_heightmap(
|
||||
math.floor(x/bpd), math.floor(y/bpd),
|
||||
|
|
|
|||
11
res/generators/default.files/biomes.json
Normal file
11
res/generators/default.files/biomes.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"flat": {
|
||||
"parameters": [],
|
||||
"layers": [
|
||||
{"height": -1, "block": "core:obstacle"}
|
||||
],
|
||||
"sea_layers": [
|
||||
{"height": -1, "block": "core:obstacle"}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
biomes = {flat = {
|
||||
parameters = {},
|
||||
layers = {
|
||||
{height=-1, block="core:obstacle"},
|
||||
},
|
||||
sea_layers = {
|
||||
{height=-1, block="core:obstacle"}
|
||||
}
|
||||
}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue