@@ -152,7 +152,7 @@ object Search : Module(
152
152
}
153
153
154
154
safeListener<ChunkDataEvent > {
155
- // We avoid listening to SPacketChunkData directly here as even on PostReceive the chunk is not always
155
+ // We avoid listening to SPacketChunkData directly here, as even on PostReceive the chunk is not always
156
156
// fully loaded into the world. Chunk load is handled on a separate thread in mc code.
157
157
// i.e. world.getChunk(x, z) can and will return an empty chunk in the packet event
158
158
defaultScope.launch {
@@ -204,7 +204,13 @@ object Search : Module(
204
204
.sortedBy { it.distanceTo(player.getPositionEyes(1f )) }
205
205
.take(maximumEntities)
206
206
.filter { it.distanceTo(player.getPositionEyes(1f )) < range }
207
- .map { Triple (it.renderBoundingBox.offset(EntityUtils .getInterpolatedAmount(it, LambdaTessellator .pTicks())), entitySearchColor, GeometryMasks .Quad .ALL ) }
207
+ .map {
208
+ Triple (
209
+ it.renderBoundingBox.offset(EntityUtils .getInterpolatedAmount(it, LambdaTessellator .pTicks())),
210
+ entitySearchColor,
211
+ GeometryMasks .Quad .ALL
212
+ )
213
+ }
208
214
.toMutableList()
209
215
entityRenderer.replaceAll(renderList)
210
216
}
@@ -300,8 +306,12 @@ object Search : Module(
300
306
val pos = BlockPos (x, y, z)
301
307
val blockState = chunk.getBlockState(pos)
302
308
if (isOldSign(blockState, pos)) {
303
- val signState = if (blockState.block == Blocks .STANDING_SIGN ) OldStandingSign (blockState) else OldWallSign (blockState)
304
- blocks.add((pos to signState))
309
+ val signState = if (blockState.block == Blocks .STANDING_SIGN ) {
310
+ OldStandingSign (blockState)
311
+ } else {
312
+ OldWallSign (blockState)
313
+ }
314
+ blocks.add(pos to signState)
305
315
continue // skip searching for regular sign at this pos
306
316
}
307
317
if (searchQuery(blockState, pos)) blocks.add(pos to blockState)
@@ -324,15 +334,9 @@ object Search : Module(
324
334
if (! illegalBedrock.value) return false
325
335
if (state.block != Blocks .BEDROCK ) return false
326
336
return when (player.dimension) {
327
- 0 -> {
328
- pos.y >= 5
329
- }
330
- - 1 -> {
331
- pos.y in 5 .. 122
332
- }
333
- else -> {
334
- false
335
- }
337
+ 0 -> pos.y >= 5
338
+ - 1 -> pos.y in 5 .. 122
339
+ else -> false
336
340
}
337
341
}
338
342
@@ -348,7 +352,8 @@ object Search : Module(
348
352
349
353
private fun SafeClientEvent.isOldSignText (pos : BlockPos ): Boolean {
350
354
// Explanation: Old signs on 2b2t (pre-2015 <1.9 ?) have older style NBT text tags.
351
- // we can tell them apart by checking if there are siblings in the tag. Old signs won't have siblings.
355
+ // We can tell them apart by checking if there are siblings in the tag.
356
+ // Old signs won't have siblings.
352
357
val signTextComponents = listOf (world.getTileEntity(pos))
353
358
.filterIsInstance<TileEntitySign >()
354
359
.flatMap { it.signText.toList() }
0 commit comments