Remove collision from water
This commit is contained in:
@@ -254,6 +254,12 @@ export class ClientLevel {
|
||||
return chunk.blocks[index] & ID_MASK;
|
||||
}
|
||||
|
||||
// whether entities bump into the block there. unloaded chunks count as solid, so nothing falls out of the world
|
||||
has_collision(x: number, y: number, z: number) {
|
||||
const block = this.get_block(x, y, z);
|
||||
return block === VOID || (block !== AIR && (this.#blocks[block]?.has_collision ?? true));
|
||||
}
|
||||
|
||||
// only changes what this client shows, drops and everything else happen on the server
|
||||
break_block(x: number, y: number, z: number) {
|
||||
const block_chunk_x = Math.floor(x / CHUNK_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user