From 3103974f5dd1250b1be5cf5a6ef1430eb3a94e60 Mon Sep 17 00:00:00 2001 From: Xiaro <62033805+Xiaro@users.noreply.github.com> Date: Fri, 8 Jan 2021 01:26:04 -0500 Subject: [PATCH] [fix] Attempt to fix StorageESP NPE crash again #1820 --- .../me/zeroeightsix/kami/module/modules/render/StorageESP.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/render/StorageESP.kt b/src/main/java/me/zeroeightsix/kami/module/modules/render/StorageESP.kt index 31a473051..45d6eef92 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/render/StorageESP.kt +++ b/src/main/java/me/zeroeightsix/kami/module/modules/render/StorageESP.kt @@ -108,7 +108,7 @@ object StorageESP : Module( for (tileEntity in world.loadedTileEntityList.toList()) { if (!checkTileEntityType(tileEntity)) continue - val box = world.getBlockState(tileEntity.pos).getSelectedBoundingBox(world, tileEntity.pos) + val box = world.getBlockState(tileEntity.pos).getSelectedBoundingBox(world, tileEntity.pos) ?: continue val color = getTileEntityColor(tileEntity) ?: continue var side = GeometryMasks.Quad.ALL @@ -151,7 +151,7 @@ object StorageESP : Module( for (entity in world.loadedEntityList.toList()) { if (!checkEntityType(entity)) continue - val box = entity.renderBoundingBox + val box = entity.renderBoundingBox ?: continue val color = getEntityColor(entity) ?: continue list.add(Triple(box, color, GeometryMasks.Quad.ALL))