Remove collision from water

This commit is contained in:
2026-09-25 17:21:46 -03:00
parent d07528bd0e
commit 05f80c81ad
9 changed files with 26 additions and 7 deletions
+5
View File
@@ -113,6 +113,11 @@ export class ServerWorld {
return this.#get_chunk(chunk_x, chunk_z)[index_in_chunk(x, y, z, chunk_x, chunk_z)];
}
// whether entities bump into the block there, water and other blocks with "collision": false don't
has_collision(x: number, y: number, z: number) {
return this.get_block_info(x, y, z)?.has_collision ?? false;
}
get_block_info(x: number, y: number, z: number): BlockRegistry | undefined {
const nid = this.get_block_nid(x, y, z);
return nid === AIR ? undefined : EverythingRegistry.get_by_id<BlockRegistry>("blocks", nid);