mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 07:28:19 +01:00
Use smaller position offset when placing blocks (#940)
This commit is contained in:
parent
bb236b34b6
commit
f0fa81b712
@ -343,7 +343,7 @@ final class BlockCollision {
|
||||
// Need to move player slightly away from block we're placing.
|
||||
// If player is at block 40 we cannot place a block at block 39 with side length 1 because the block will be in [39, 40]
|
||||
// For this reason we subtract a small amount from the player position
|
||||
Point playerPos = entity.getPosition().add(entity.getPosition().sub(blockPos).mul(0.01));
|
||||
Point playerPos = entity.getPosition().add(entity.getPosition().sub(blockPos).mul(0.0000001));
|
||||
intersects = b.registry().collisionShape().intersectBox(playerPos.sub(blockPos), entity.getBoundingBox());
|
||||
} else {
|
||||
intersects = b.registry().collisionShape().intersectBox(entity.getPosition().sub(blockPos), entity.getBoundingBox());
|
||||
|
Loading…
Reference in New Issue
Block a user