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
+1 -2
View File
@@ -1,4 +1,3 @@
import { AIR } from "$/common/constants.ts";
import { move_body } from "$/common/physics.ts";
import type { ClientLevel } from "../level/client_level.ts";
@@ -73,7 +72,7 @@ export abstract class Entity {
// falls and moves by its velocity for one tick, see move_body
move() {
const collisions = move_body(this, this.gravity, (x, y, z) => this.level.get_block(x, y, z) !== AIR);
const collisions = move_body(this, this.gravity, (x, y, z) => this.level.has_collision(x, y, z));
this.colliding_x = collisions.x;
this.colliding_y = collisions.y;
this.colliding_z = collisions.z;