Skip to content

Commit

Permalink
fix: Always render entities outside the world height, fixes CaffeineM…
Browse files Browse the repository at this point in the history
  • Loading branch information
jellysquid3 committed Jul 12, 2020
1 parent d493957 commit 885222a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@ public boolean isEntityVisible(Entity entity) {

Box box = entity.getVisibilityBoundingBox();

// Entities outside the valid world height will never map to a rendered chunk
// Always render these entities or they'll be culled incorrectly!
if (box.maxY < 0.5D || box.minY > 255.5D) {
return true;
}

int minX = MathHelper.floor(box.minX - 0.5D) >> 4;
int minY = MathHelper.floor(box.minY - 0.5D) >> 4;
int minZ = MathHelper.floor(box.minZ - 0.5D) >> 4;
Expand Down

0 comments on commit 885222a

Please sign in to comment.