diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-30 11:07:53 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-30 11:07:53 +0100 |
| commit | b97ccd10b1648e1db2884bf11c346cb7b2bead99 (patch) | |
| tree | 0b247ce7d52954aec7f6ab8f3cb6eb610e64aaf2 /src/main/java/at/hannibal2/skyhanni/data | |
| parent | 9505f1c311d53e908d4f47ff61bb132e9aa80282 (diff) | |
| download | skyhanni-b97ccd10b1648e1db2884bf11c346cb7b2bead99.tar.gz skyhanni-b97ccd10b1648e1db2884bf11c346cb7b2bead99.tar.bz2 skyhanni-b97ccd10b1648e1db2884bf11c346cb7b2bead99.zip | |
Changed OwnInventoryItemUpdateEvent to be called synced to main thread.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt index 605aca858..a7b31159b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent import at.hannibal2.skyhanni.events.PacketEvent import at.hannibal2.skyhanni.events.entity.ItemAddInInventoryEvent +import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.LorenzUtils @@ -36,7 +37,9 @@ class OwnInventoryData { val windowId = packet.func_149175_c() if (windowId == 0) { val item = packet.func_149174_e() ?: return - OwnInventoryItemUpdateEvent(item).postAndCatch() + DelayedRun.runNextTick { + OwnInventoryItemUpdateEvent(item).postAndCatch() + } } } } |
