Remove collision from water
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user