Skip to content

Commit

Permalink
Correctly retrun true for empty input shapes in EntityGetter#isUnobst…
Browse files Browse the repository at this point in the history
…ructed

Vanilla will return true for empty shapes, so we should as well.
  • Loading branch information
Spottedleaf committed Jan 27, 2025
1 parent d31b151 commit ce4ee76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ default List<VoxelShape> getEntityCollisions(final Entity entity, AABB box) {
@Overwrite
default boolean isUnobstructed(final Entity entity, final VoxelShape voxel) {
if (voxel.isEmpty()) {
return false;
return true;
}

final AABB singleAABB = ((CollisionVoxelShape)voxel).moonrise$getSingleAABBRepresentation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ abstract class LevelMixin implements LevelAccessor, AutoCloseable {
public boolean isUnobstructed(final Entity entity) {
final AABB boundingBox = entity.getBoundingBox();
if (CollisionUtil.isEmpty(boundingBox)) {
return false;
return true;
}

final List<Entity> entities = this.getEntities(
Expand Down

0 comments on commit ce4ee76

Please sign in to comment.