Skip to content

Commit

Permalink
fix: CME on KuudraChestProfit
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed Sep 6, 2024
1 parent 5b80c84 commit d73d6f3
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package gg.skytils.skytilsmod.features.impl.crimson
import gg.essential.universal.UResolution
import gg.skytils.skytilsmod.Skytils
import gg.skytils.skytilsmod.Skytils.Companion.IO
import gg.skytils.skytilsmod.core.MC
import gg.skytils.skytilsmod.core.structure.GuiElement
import gg.skytils.skytilsmod.events.impl.GuiContainerEvent
import gg.skytils.skytilsmod.features.impl.handlers.AuctionData
Expand All @@ -31,7 +32,9 @@ import gg.skytils.skytilsmod.utils.graphics.SmartFontRenderer
import gg.skytils.skytilsmod.utils.graphics.SmartFontRenderer.TextAlignment
import gg.skytils.skytilsmod.utils.graphics.colors.CommonColors
import gg.skytils.skytilsmod.utils.graphics.colors.CustomColor
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import net.minecraft.client.renderer.GlStateManager
import net.minecraft.inventory.ContainerChest
import net.minecraft.item.ItemStack
Expand Down Expand Up @@ -182,9 +185,11 @@ object KuudraChestProfit {
} else {
AuctionData.lowestBINs[identifier] ?: 0.0
}
items.add(KuudraChestLootItem(item.stackSize, displayName, itemValue))
withContext(Dispatchers.MC) {
items.add(KuudraChestLootItem(item.stackSize, displayName, itemValue))

value += itemValue
value += itemValue
}
}
}

Expand Down

0 comments on commit d73d6f3

Please sign in to comment.