Skip to content

Commit a8b5c4b

Browse files
committed
Refactor
1 parent 5edef63 commit a8b5c4b

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

common/src/main/kotlin/com/lambda/interaction/visibilty/VisibilityChecker.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ object VisibilityChecker {
8484
private fun stay(priority: Int = 0, config: IRotationConfig) =
8585
RotationRequest(config, RotationManager.currentRotation, priority)
8686

87-
inline fun SafeContext.scanVisibleSurfaces(
87+
private inline fun SafeContext.scanVisibleSurfaces(
8888
box: Box,
8989
sides: Set<Direction>,
9090
resolution: Int,

common/src/main/kotlin/com/lambda/module/modules/player/Freecam.kt

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,6 @@ object Freecam : Module(
6464
rotation = rotation.withDelta(deltaYaw * factor, deltaPitch * factor)
6565
}
6666

67-
@JvmStatic fun updateTarget() {
68-
runSafe {
69-
mc.crosshairTarget = rayCast(
70-
interpolatedPosition,
71-
interpolatedRotation.vector,
72-
interaction.reachDistance.toDouble(),
73-
RayCastMask.BOTH,
74-
true
75-
)
76-
}
77-
}
78-
7967
init {
8068
onEnable {
8169
position = player.eyePos
@@ -114,7 +102,13 @@ object Freecam : Module(
114102

115103
listener<RenderEvent.UpdateTarget> {
116104
it.cancel()
117-
updateTarget()
105+
mc.crosshairTarget = rayCast(
106+
interpolatedPosition,
107+
interpolatedRotation.vector,
108+
interaction.reachDistance.toDouble(),
109+
RayCastMask.BOTH,
110+
true
111+
)
118112
}
119113

120114
listener<ConnectionEvent.Disconnect> {

0 commit comments

Comments
 (0)