Skip to content

Commit 45134eb

Browse files
committed
Fix format
1 parent 053dc45 commit 45134eb

File tree

1 file changed

+19
-14
lines changed
  • src/main/kotlin/com/lambda/client/module/modules/render

1 file changed

+19
-14
lines changed

src/main/kotlin/com/lambda/client/module/modules/render/Search.kt

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ object Search : Module(
152152
}
153153

154154
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
156156
// fully loaded into the world. Chunk load is handled on a separate thread in mc code.
157157
// i.e. world.getChunk(x, z) can and will return an empty chunk in the packet event
158158
defaultScope.launch {
@@ -204,7 +204,13 @@ object Search : Module(
204204
.sortedBy { it.distanceTo(player.getPositionEyes(1f)) }
205205
.take(maximumEntities)
206206
.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+
}
208214
.toMutableList()
209215
entityRenderer.replaceAll(renderList)
210216
}
@@ -300,8 +306,12 @@ object Search : Module(
300306
val pos = BlockPos(x, y, z)
301307
val blockState = chunk.getBlockState(pos)
302308
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)
305315
continue // skip searching for regular sign at this pos
306316
}
307317
if (searchQuery(blockState, pos)) blocks.add(pos to blockState)
@@ -324,15 +334,9 @@ object Search : Module(
324334
if (!illegalBedrock.value) return false
325335
if (state.block != Blocks.BEDROCK) return false
326336
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
336340
}
337341
}
338342

@@ -348,7 +352,8 @@ object Search : Module(
348352

349353
private fun SafeClientEvent.isOldSignText(pos: BlockPos): Boolean {
350354
// 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.
352357
val signTextComponents = listOf(world.getTileEntity(pos))
353358
.filterIsInstance<TileEntitySign>()
354359
.flatMap { it.signText.toList() }

0 commit comments

Comments
 (0)