aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/notenoughupdates
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-05-04 15:21:57 +0200
committernea <nea@nea.moe>2023-05-04 15:21:57 +0200
commit720cfdd1ed9fc203dd65bbcdc368e124dd35d3cf (patch)
tree0432fa6f277e5e1e668454524f0c095cd71d8c40 /src/main/kotlin/moe/nea/notenoughupdates
parentf2aa75f7c193513215ba4619c66bcc1449b0bc27 (diff)
downloadFirmament-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/nea/notenoughupdates')
-rw-r--r--src/main/kotlin/moe/nea/notenoughupdates/rei/SBItemEntryDefinition.kt12
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")!!
}