Skip to content

Commit

Permalink
Fix NPE from facing being null when drawing grid overlays (#2401)
Browse files Browse the repository at this point in the history
(cherry picked from commit ae5ef98)
  • Loading branch information
M-W-K authored and ALongStringOfNumbers committed Apr 24, 2024
1 parent 5d458f0 commit d90e8c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/gregtech/common/ToolEventHandlers.java
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ private static void drawGridOverlays(@NotNull AxisAlignedBB box) {

@SideOnly(Side.CLIENT)
private static void drawGridOverlays(EnumFacing facing, AxisAlignedBB box, Predicate<EnumFacing> test) {
if (facing == null) return;

Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.getBuffer();
buffer.begin(3, DefaultVertexFormats.POSITION_COLOR);
Expand Down

0 comments on commit d90e8c1

Please sign in to comment.