From 1ba5a48080de0c1ecbc55885a4c5711d36a06968 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:14:32 +0100 Subject: Fixed duplicate tracker items when taking from storage/chests. --- src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt index 2bc9cf3c3..18a8d2841 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt @@ -18,6 +18,7 @@ import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.client.Minecraft +import net.minecraft.network.play.client.C0EPacketClickWindow import net.minecraft.network.play.server.S0DPacketCollectItem import net.minecraft.network.play.server.S2FPacketSetSlot import net.minecraftforge.fml.common.eventhandler.EventPriority @@ -53,6 +54,16 @@ class OwnInventoryData { } } + @SubscribeEvent + fun onClickEntity(event: PacketEvent.SendEvent) { + if (!LorenzUtils.inSkyBlock) return + val packet = event.packet + + if (packet is C0EPacketClickWindow) { + dirty = true + } + } + @SubscribeEvent fun onTick(event: LorenzTickEvent) { if (!LorenzUtils.inSkyBlock) return -- cgit