[fix] Attempt to fix StorageESP NPE crash again

#1820
This commit is contained in:
Xiaro 2021-01-08 01:26:04 -05:00
parent 6de259097a
commit 3103974f5d
No known key found for this signature in database
GPG Key ID: 996D265D6E155377
1 changed files with 2 additions and 2 deletions

View File

@ -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))