Skip to content

Commit

Permalink
safer ShouldSideBeRenderedQuick
Browse files Browse the repository at this point in the history
  • Loading branch information
FalsePattern committed Nov 10, 2024
1 parent b0beb26 commit b01203e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ private int getBlockMetadataOffset(int x, int y, int z, Vector3ic offset) {
}

private boolean shouldSideBeRenderedQuick(Block block, int x, int y, int z, Facing facing) {
return block.shouldSideBeRendered(blockAccess, x + facing.front.x(), y + facing.front.y(), z + facing.front.z(), facing.face.ordinal());
try {
return block.shouldSideBeRendered(blockAccess, x + facing.front.x(), y + facing.front.y(), z + facing.front.z(), facing.face.ordinal());
} catch (Throwable ignored) {
return true;
}
}

private boolean renderFace(Facing facing) {
Expand Down

0 comments on commit b01203e

Please sign in to comment.