Remove stacksize from hashcode

This commit is contained in:
nea
2023-05-30 00:30:34 +02:00
parent edb723e423
commit 1d3b28f9f1

View File

@@ -77,7 +77,7 @@ object SBItemEntryDefinition : EntryDefinition<SBItemStack> {
override fun hash(entry: EntryStack<SBItemStack>, value: SBItemStack, context: ComparisonContext): Long { override fun hash(entry: EntryStack<SBItemStack>, value: SBItemStack, context: ComparisonContext): Long {
// Repo items are immutable, and get replaced entirely when loaded from disk // Repo items are immutable, and get replaced entirely when loaded from disk
return value.skyblockId.hashCode() * 31L + if (!context.isExact) value.stackSize else 0 return value.skyblockId.hashCode() * 31L
} }
override fun wildcard(entry: EntryStack<SBItemStack>?, value: SBItemStack): SBItemStack { override fun wildcard(entry: EntryStack<SBItemStack>?, value: SBItemStack): SBItemStack {