diff options
author | nea <nea@nea.moe> | 2023-05-04 15:21:57 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-05-04 15:21:57 +0200 |
commit | 720cfdd1ed9fc203dd65bbcdc368e124dd35d3cf (patch) | |
tree | 0432fa6f277e5e1e668454524f0c095cd71d8c40 /src/main/kotlin/moe | |
parent | f2aa75f7c193513215ba4619c66bcc1449b0bc27 (diff) | |
download | firmament-720cfdd1ed9fc203dd65bbcdc368e124dd35d3cf.tar.gz firmament-720cfdd1ed9fc203dd65bbcdc368e124dd35d3cf.tar.bz2 firmament-720cfdd1ed9fc203dd65bbcdc368e124dd35d3cf.zip |
Slog more nullable references through the REI plugin
Diffstat (limited to 'src/main/kotlin/moe')
-rw-r--r-- | src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt b/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt index 22835e6..8ea691b 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt @@ -85,20 +85,20 @@ object SBItemEntryDefinition : EntryDefinition<NEUItem> { return VanillaEntryTypes.ITEM.definition.asFormattedText(entry.asItemEntry(), value.asItemStack()) } - override fun hash(entry: EntryStack<NEUItem>, value: NEUItem, context: ComparisonContext): Long { + override fun hash(entry: EntryStack<NEUItem>, value: NEUItem?, context: ComparisonContext): Long { // Repo items are immutable, and get replaced entirely when loaded from disk return System.identityHashCode(value) * 31L } - override fun wildcard(entry: EntryStack<NEUItem>, value: NEUItem): NEUItem { + override fun wildcard(entry: EntryStack<NEUItem>?, value: NEUItem?): NEUItem? { return value } - override fun normalize(entry: EntryStack<NEUItem>, value: NEUItem): NEUItem { + override fun normalize(entry: EntryStack<NEUItem>?, value: NEUItem?): NEUItem? { return value } - override fun copy(entry: EntryStack<NEUItem>?, value: NEUItem): NEUItem { + override fun copy(entry: EntryStack<NEUItem>?, value: NEUItem?): NEUItem? { return value } @@ -106,8 +106,8 @@ object SBItemEntryDefinition : EntryDefinition<NEUItem> { return false } - override fun getIdentifier(entry: EntryStack<NEUItem>?, value: NEUItem): Identifier { - return value.getIdentifier() + override fun getIdentifier(entry: EntryStack<NEUItem>?, value: NEUItem?): Identifier { + return value?.getIdentifier() ?: Identifier.of("skyblockitem", "null")!! } |