Correctly retrun true for empty input shapes in EntityGetter#isUnobstructed

Vanilla will return true for empty shapes, so we should as well.
This commit is contained in:
Spottedleaf
2025-01-27 07:51:49 -08:00
parent d31b15122f
commit ce4ee767fe
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ interface EntityGetterMixin {
@Overwrite
default boolean isUnobstructed(final Entity entity, final VoxelShape voxel) {
if (voxel.isEmpty()) {
return false;
return true;
}
final AABB singleAABB = ((CollisionVoxelShape)voxel).moonrise$getSingleAABBRepresentation();

View File

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