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