Seasons based on a calendar

This commit is contained in:
2026-10-09 22:09:21 -03:00
parent 4d5700f0bf
commit 7fe9c15b67
12 changed files with 88 additions and 33 deletions
+3
View File
@@ -8,6 +8,7 @@ import { TICKS_PER_SECOND } from "$/common/constants.ts";
import type { BlockRegistry } from "$/common/everything_registry.ts";
import type { ItemStack } from "$/common/inventory.ts";
import type { Shape } from "$/common/block_shapes.ts";
import type { Season } from "$/common/worldgen/biomes.ts";
import { type Collisions, type LiquidInCell, physics } from "$/common/physics.ts";
import type { EntityData, EntityEvent, EntityInfo } from "$/common/protocol.ts";
import type { ServerPlayer } from "../player.ts";
@@ -72,6 +73,8 @@ export interface EntityLevel {
get_block_info(x: number, y: number, z: number): BlockRegistry | undefined;
// the column's biome, like "bworld:plains"
biome_at(x: number, z: number): string;
// that biome's season now, see biome_season in common/worldgen/biomes.ts
season_at(x: number, z: number): Season;
add_entity(entity: Entity): void;
get_entity(id: string): Entity | undefined;
// entities whose feet are within the box around x, y, z