File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1717
1818package com .lambda .mixin ;
1919
20+ import com .lambda .core .TimerManager ;
2021import com .lambda .event .EventFlow ;
2122import com .lambda .event .events .ClientEvent ;
2223import com .lambda .event .events .InventoryEvent ;
@@ -171,4 +172,14 @@ void injectFastPlace(CallbackInfo ci) {
171172
172173 itemUseCooldown = Interact .getPlaceDelay ();
173174 }
175+
176+ @ WrapMethod (method = "getTargetMillisPerTick" )
177+ float getTargetMillisPerTick (float millis , Operation <Float > original ) {
178+ var length = TimerManager .INSTANCE .getLength ();
179+
180+ if (length == TimerManager .DEFAULT_LENGTH )
181+ return original .call (millis );
182+ else
183+ return (float ) TimerManager .INSTANCE .getLength ();
184+ }
174185}
Original file line number Diff line number Diff line change @@ -23,13 +23,14 @@ import kotlin.concurrent.fixedRateTimer
2323import kotlin.time.Duration.Companion.milliseconds
2424
2525object TimerManager : Loadable {
26+ const val DEFAULT_LENGTH = 50.0
2627 var lastTickLength = 50.0
2728
2829 override fun load () = " Loaded Timer Manager"
2930
3031 val length: Double
3132 get() {
32- var length = 50.0
33+ var length = DEFAULT_LENGTH
3334
3435 ClientEvent .TimerUpdate (1.0 ).post {
3536 length / = speed
You can’t perform that action at this time.
0 commit comments