@@ -10,6 +10,7 @@ import com.lambda.client.util.color.DyeColors
1010import com.lambda.client.util.color.HueCycler
1111import com.lambda.client.util.graphics.ESPRenderer
1212import com.lambda.client.util.graphics.GeometryMasks
13+ import com.lambda.client.util.math.VectorUtils.distanceTo
1314import com.lambda.client.util.threads.safeAsyncListener
1415import kotlinx.coroutines.Dispatchers
1516import kotlinx.coroutines.coroutineScope
@@ -38,6 +39,8 @@ object StorageESP : Module(
3839 private val dispenser by setting(" Dispenser" , false , { page == Page .TYPE })
3940 private val hopper by setting(" Hopper" , false , { page == Page .TYPE })
4041 private val cart by setting(" Minecart" , false , { page == Page .TYPE })
42+ private val infinite by setting(" Infinite Range" , true ) // To avoid a hard to control range slider
43+ private val range by setting(" Range" , 64 , 8 .. 512 , 1 , { page == Page .TYPE && ! infinite }, unit = " blocks" )
4144
4245 /* Color settings */
4346 private val colorChest by setting(" Chest Color" , DyeColors .ORANGE , { page == Page .COLOR })
@@ -105,6 +108,7 @@ object StorageESP : Module(
105108
106109 private fun SafeClientEvent.updateTileEntities (list : MutableList <Triple <AxisAlignedBB , ColorHolder , Int >>) {
107110 for (tileEntity in world.loadedTileEntityList.toList()) {
111+ if (! infinite && player.distanceTo(tileEntity.pos) > range) continue
108112 if (! checkTileEntityType(tileEntity)) continue
109113
110114 val box = world.getBlockState(tileEntity.pos).getSelectedBoundingBox(world, tileEntity.pos) ? : continue
@@ -150,6 +154,7 @@ object StorageESP : Module(
150154
151155 private fun SafeClientEvent.updateEntities (list : MutableList <Triple <AxisAlignedBB , ColorHolder , Int >>) {
152156 for (entity in world.loadedEntityList.toList()) {
157+ if (! infinite && player.getDistance(entity) > range) continue
153158 if (! checkEntityType(entity)) continue
154159
155160 val box = entity.renderBoundingBox ? : continue
0 commit comments