Basin
This commit is contained in:
@@ -80,9 +80,10 @@ export class ItemEntity extends Entity {
|
||||
this.pickup_delay -= 1;
|
||||
}
|
||||
|
||||
// covered by a block placed on it, float out the top instead of being stuck inside
|
||||
// covered by a block placed on it, float out the top instead of being stuck inside. only inside what it bumps
|
||||
// into, like minecraft's noCollision, so it can lie in a block with a hollow, like a basin
|
||||
const level = this.level;
|
||||
if (level.has_collision(Math.floor(this.x), Math.floor(this.y + this.height / 2), Math.floor(this.z))) {
|
||||
if (!physics.box_is_free(this, 0, 0, 0, (x, y, z) => level.collision_shape(x, y, z))) {
|
||||
this.vy = UNSTICK_SPEED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user