Skip to content

Commit

Permalink
fix: do not test block collision on entities without collision
Browse files Browse the repository at this point in the history
  • Loading branch information
mworzala committed May 31, 2024
1 parent 4a07089 commit 9822331
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static PhysicsResult handlePhysics(@NotNull BoundingBox boundingBox,
static Entity canPlaceBlockAt(Instance instance, Point blockPos, Block b) {
for (Entity entity : instance.getNearbyEntities(blockPos, 3)) {
final EntityType type = entity.getEntityType();
if (type == EntityType.ITEM || type == EntityType.ARROW)
if (!entity.hasCollision() || type == EntityType.ITEM || type == EntityType.ARROW)
continue;
// Marker Armor Stands should not prevent block placement
if (entity.getEntityMeta() instanceof ArmorStandMeta armorStandMeta && armorStandMeta.isMarker())
Expand Down

0 comments on commit 9822331

Please sign in to comment.