mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-02 11:21:15 +01:00
Prevent double intersect check
This commit is contained in:
parent
7d8ce32ba9
commit
8e1ffdff7d
@ -107,6 +107,10 @@ public class BlockPlacementListener {
|
||||
boolean intersect = player.getBoundingBox().intersect(blockPosition);
|
||||
if (!intersect && block.isSolid()) {
|
||||
for (Entity entity : entities) {
|
||||
// 'player' has already been checked
|
||||
if (entity == player)
|
||||
continue;
|
||||
|
||||
intersect = entity.getBoundingBox().intersect(blockPosition);
|
||||
if (intersect)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user