Pathfinding search

This commit is contained in:
2026-11-21 13:07:29 -03:00
parent e72932456a
commit 277664d2d9
5 changed files with 459 additions and 1 deletions
+4
View File
@@ -72,6 +72,10 @@ export interface EntityLevel {
// the bottom of the world, see WorldShape
readonly min_y: number;
has_collision(x: number, y: number, z: number): boolean;
// whether the chunk is kept, see World.has_chunk. reading blocks in one that isn't builds it, which takes a while
has_chunk(chunk_x: number, chunk_z: number): boolean;
// whether mobs' paths go through the block, see MOBS_PATH_THROUGH in pathfinding.ts
passes_through(x: number, y: number, z: number): boolean;
// what it bumps into at a block, see common/physics.ts
collision_shape(x: number, y: number, z: number): boolean | Shape;
// water, and other blocks you're in instead of on