File tree Expand file tree Collapse file tree 4 files changed +4
-27
lines changed
src/main/kotlin/com/lambda Expand file tree Collapse file tree 4 files changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -159,14 +159,6 @@ object BreakManager : RequestHandler<BreakRequest>(
159159 field = value
160160 }
161161
162- fun Any.onBreak (
163- alwaysListen : Boolean = false,
164- priority : Int = 0,
165- block : SafeContext .() -> Unit
166- ) = this .listen<UpdateManagerEvent .Break >(priority, alwaysListen) {
167- block()
168- }
169-
170162 override fun load (): String {
171163 super .load()
172164
Original file line number Diff line number Diff line change @@ -83,14 +83,6 @@ object PlaceManager : RequestHandler<PlaceRequest>(
8383 override val blockedPositions
8484 get() = pendingActions.map { it.context.blockPos }
8585
86- fun Any.onPlace (
87- alwaysListen : Boolean = false,
88- priority : Int = 0,
89- block : SafeContext .() -> Unit
90- ) = this .listen<UpdateManagerEvent .Place >(priority, alwaysListen) {
91- block()
92- }
93-
9486 override fun load (): String {
9587 super .load()
9688
Original file line number Diff line number Diff line change @@ -60,14 +60,6 @@ object RotationManager : RequestHandler<RotationRequest>(
6060 var activeRequest: RotationRequest ? = null
6161 private var changedThisTick = false
6262
63- fun Any.onRotate (
64- alwaysListen : Boolean = false,
65- priority : Int = 0,
66- block : SafeContext .() -> Unit
67- ) = this .listen<UpdateManagerEvent .Rotation >(priority, alwaysListen) {
68- block()
69- }
70-
7163 override fun load (): String {
7264 super .load()
7365
Original file line number Diff line number Diff line change 1818package com.lambda.module.modules.player
1919
2020import com.lambda.Lambda.mc
21+ import com.lambda.event.events.UpdateManagerEvent
22+ import com.lambda.event.listener.SafeListener.Companion.listen
2123import com.lambda.gui.LambdaScreen
2224import com.lambda.interaction.request.rotating.Rotation
2325import com.lambda.interaction.request.rotating.RotationConfig
24- import com.lambda.interaction.request.rotating.RotationManager.onRotate
2526import com.lambda.interaction.request.rotating.RotationMode
2627import com.lambda.interaction.request.rotating.visibilty.lookAt
2728import com.lambda.module.Module
@@ -67,8 +68,8 @@ object InventoryMove : Module(
6768 this == null
6869
6970 init {
70- onRotate {
71- if (! arrowKeys || mc.currentScreen.hasInputOrNull) return @onRotate
71+ listen< UpdateManagerEvent . Rotation > {
72+ if (! arrowKeys || mc.currentScreen.hasInputOrNull) return @listen
7273
7374 val pitch = (isKeyPressed(GLFW_KEY_DOWN , GLFW_KEY_KP_2 ).toFloatSign() -
7475 isKeyPressed(GLFW_KEY_UP , GLFW_KEY_KP_8 ).toFloatSign()) * speed
You can’t perform that action at this time.
0 commit comments