Hopefully increase biome size

This commit is contained in:
2026-10-02 19:24:49 -03:00
parent 3202c18ab5
commit 4397bf2c90
2 changed files with 12 additions and 4 deletions
+2 -2
View File
@@ -500,8 +500,8 @@ export class OverworldTerrain {
this.#island_b = new OctaveNoise2D(seed, "island_b", 320, [1, 1]);
this.#erosion = new OctaveNoise2D(seed, "erosion", 1280, [1, 1, 0, 1, 1]);
this.#ridges = new OctaveNoise2D(seed, "ridges", 640, [1, 2, 1]);
this.#temperature = new OctaveNoise2D(seed, "temperature", 1536, [1.5, 0, 1]);
this.#humidity = new OctaveNoise2D(seed, "humidity", 512, [1, 1]);
this.#temperature = new OctaveNoise2D(seed, "temperature", 3072, [1.5, 0, 1]);
this.#humidity = new OctaveNoise2D(seed, "humidity", 1536, [1, 1]);
this.#warp_x = new OctaveNoise2D(seed, "warp_x", 200, [1, 1]);
this.#warp_z = new OctaveNoise2D(seed, "warp_z", 200, [1, 1]);
this.#region = new OctaveNoise2D(seed, "region", 2048, [1, 1, 2, 2, 1, 1]);
+10 -2
View File
@@ -1,7 +1,7 @@
// monsters spawning on their own in the dark near players, like undergarden's rotwalkers, see natural_spawner.ts and
// mods/undergarden/worldgen/spawns.json
import { assert, assertEquals } from "@std/assert";
import { CHUNK_SIZE } from "$/common/constants.ts";
import { CHUNK_HEIGHT, CHUNK_SIZE } from "$/common/constants.ts";
import { decode_level_chunk } from "$/common/chunk_streaming.ts";
import {
block_light_emission,
@@ -15,7 +15,9 @@ import { Mob } from "$/server/game/entity/mob.ts";
import { NaturalSpawner } from "$/server/game/natural_spawner.ts";
import { test_game } from "./helpers.ts";
// chunk 6, 6: a closed stone room with its floor at y 60 and its roof at y 64, and alice standing 40 blocks away
// chunk 6, 6: a closed stone room with its floor at y 60 and its roof at y 64, and alice standing 40 blocks away.
// the rest of the chunk is solid stone below it and open sky above, so wherever worldgen puts caves or shade, the
// room is the only dark place
const CHUNK = 6;
const FLOOR = 60;
const ROOF = 64;
@@ -24,6 +26,12 @@ async function setup(roof = "bworld:stone") {
const t = await test_game("mods");
const world = t.game.world;
const x0 = CHUNK * CHUNK_SIZE;
for (let x = x0; x < x0 + CHUNK_SIZE; x++) {
for (let z = x0; z < x0 + CHUNK_SIZE; z++) {
for (let y = 0; y < FLOOR; y++) world.set_block(x, y, z, "bworld:stone");
for (let y = ROOF + 1; y < CHUNK_HEIGHT; y++) world.set_block(x, y, z, "bworld:air");
}
}
for (let x = x0 - 1; x <= x0 + CHUNK_SIZE; x++) {
for (let z = x0 - 1; z <= x0 + CHUNK_SIZE; z++) {
const wall = x < x0 || z < x0 || x >= x0 + CHUNK_SIZE || z >= x0 + CHUNK_SIZE;