From 78258dce4efa241ad40e9f2ca57ef687204202e9 Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Sun, 3 Nov 2024 18:53:45 +0100 Subject: [PATCH] Add nullcheck to laser render method --- .../java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 8f4212eb7..fcaa8b9d5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -229,6 +229,7 @@ public final class AssetUtil { public static void renderLaser(PoseStack matrixStack, MultiBufferSource buffer, float offX, float offY, float offZ, float yaw, float pitch, float length, float rotationTime, int color, float alpha, float beamWidth) { Level world = Minecraft.getInstance().level; + if (world == null) return; /* int r = (color >> 16) & 0xFF; int g = (color >> 8) & 0xFF; int b = color & 0xFF;