Skip to content

Commit

Permalink
make display only updated when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
catgirlseraid committed Jul 24, 2024
1 parent 98b157c commit b3888ea
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@ object ItemPickupLog {
checkForDuplicateItems(itemList, oldItemList, false)
checkForDuplicateItems(oldItemList, itemList, true)

updateDisplay()
if (itemsRemovedFromInventory.values.removeIf { it.isExpired() } || itemsAddedToInventory.values.removeIf { it.isExpired() }) {
updateDisplay()
} else if (itemList != oldItemList) {
updateDisplay()
}

}

private fun updateItem(hash: Int, itemInfo: PickupEntry, item: ItemStack, removed: Boolean) {
Expand Down

0 comments on commit b3888ea

Please sign in to comment.