Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
Faster ChestStealer
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna5ama committed Sep 17, 2023
1 parent 8c2bb27 commit 69efa35
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package dev.luna5ama.trollhack.module.modules.player

import dev.luna5ama.trollhack.event.SafeClientEvent
import dev.luna5ama.trollhack.event.events.RunGameLoopEvent
import dev.luna5ama.trollhack.event.events.TickEvent
import dev.luna5ama.trollhack.event.safeConcurrentListener
import dev.luna5ama.trollhack.event.safeListener
import dev.luna5ama.trollhack.module.Category
import dev.luna5ama.trollhack.module.Module
Expand Down Expand Up @@ -60,7 +62,7 @@ internal object ChestStealer : Module(
private var lastTask: InventoryTask? = null

init {
safeListener<TickEvent.Pre> {
safeConcurrentListener<RunGameLoopEvent.Tick> {
val flag = isContainerOpen()

stealing = flag && (stealing || mode == Mode.ALWAYS) && stealOrStore(getStealingSlot(), ContainerMode.STEAL)
Expand Down

0 comments on commit 69efa35

Please sign in to comment.