Prevent double intersect check

This commit is contained in:
themode 2021-01-13 06:34:09 +01:00
parent 7d8ce32ba9
commit 8e1ffdff7d
1 changed files with 4 additions and 0 deletions

View File

@ -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;