collapse for loop as apparently this is valid syntax in kotlin

This commit is contained in:
Bella 2020-04-24 22:44:21 -04:00
parent 456cd901e6
commit 3678a5772c
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3
1 changed files with 7 additions and 9 deletions

View File

@ -51,15 +51,13 @@ class NoGlitchBlocks : Module() {
return
}
val pos = mc.player.position
for (dx in -range.value..range.value) {
for (dy in -range.value..range.value) for (dz in -range.value..range.value) {
val packet = CPacketPlayerDigging(
CPacketPlayerDigging.Action.ABORT_DESTROY_BLOCK,
BlockPos(pos.getX() + dx, pos.getY() + dy, pos.getZ() + dz),
EnumFacing.UP /* with ABORT_DESTROY_BLOCK, this value is unused */
)
conn!!.sendPacket(packet)
}
for (dx in -range.value..range.value) for (dy in -range.value..range.value) for (dz in -range.value..range.value) {
val packet = CPacketPlayerDigging(
CPacketPlayerDigging.Action.ABORT_DESTROY_BLOCK,
BlockPos(pos.getX() + dx, pos.getY() + dy, pos.getZ() + dz),
EnumFacing.UP /* with ABORT_DESTROY_BLOCK, this value is unused */
)
conn!!.sendPacket(packet)
}
}
}