Apply suggestions from code review

This commit is contained in:
liv 2021-03-12 11:25:02 -05:00 committed by GitHub
parent 61a358c546
commit 7a03990a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -322,6 +322,7 @@ internal object CrystalAura : Module(
val side = getClosestVisibleSide(pos) ?: EnumFacing.UP
return CPacketPlayerTryUseItemOnBlock(pos, side, hand, 0.5f, placeOffset, 0.5f)
}
private fun SafeClientEvent.packetExplode(entityID: Int, pos: BlockPos, vec3d: Vec3d) {
if (!preExplode()) return
@ -566,4 +567,4 @@ internal object CrystalAura : Module(
lastLookAt = CombatManager.target?.positionVector ?: Vec3d.ZERO
}
/* End of rotation */
}
}

View File

@ -141,8 +141,6 @@ fun SafeClientEvent.getClosestVisibleSide(pos: BlockPos): EnumFacing? {
/**
* Get the "visible" sides related to player's eye position
*
* Reverse engineered from HauseMaster's anti cheat plugin
*/
fun SafeClientEvent.getVisibleSides(pos: BlockPos, assumeAirAsFullBox: Boolean = false): Set<EnumFacing> {
val visibleSides = EnumSet.noneOf(EnumFacing::class.java)