aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/rei/recipes
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2023-12-27 13:16:52 +0100
committerLinnea Gräf <nea@nea.moe>2023-12-27 13:16:52 +0100
commit51c9df52fca0332d34706d06f09847ddb1ac2dd5 (patch)
treef30d020abb06ca7d55123eb8d9fbcda1eee1e962 /src/main/kotlin/moe/nea/firmament/rei/recipes
parent2c9c38868345d5e133179597936f8e584075b8de (diff)
downloadFirmament-51c9df52fca0332d34706d06f09847ddb1ac2dd5.tar.gz
Firmament-51c9df52fca0332d34706d06f09847ddb1ac2dd5.tar.bz2
Firmament-51c9df52fca0332d34706d06f09847ddb1ac2dd5.zip
Fix sentinel items being displayed in recipes somtimes
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/rei/recipes')
-rw-r--r--src/main/kotlin/moe/nea/firmament/rei/recipes/SBRecipe.kt23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/rei/recipes/SBRecipe.kt b/src/main/kotlin/moe/nea/firmament/rei/recipes/SBRecipe.kt
index 9a64857..50dd722 100644
--- a/src/main/kotlin/moe/nea/firmament/rei/recipes/SBRecipe.kt
+++ b/src/main/kotlin/moe/nea/firmament/rei/recipes/SBRecipe.kt
@@ -6,25 +6,30 @@
package moe.nea.firmament.rei.recipes
+import io.github.moulberry.repo.data.NEUIngredient
import io.github.moulberry.repo.data.NEURecipe
import me.shedaniel.rei.api.common.display.Display
import me.shedaniel.rei.api.common.entry.EntryIngredient
import moe.nea.firmament.rei.SBItemEntryDefinition
import moe.nea.firmament.util.SkyblockId
-abstract class SBRecipe() : Display {
+abstract class SBRecipe : Display {
abstract val neuRecipe: NEURecipe
override fun getInputEntries(): List<EntryIngredient> {
- return neuRecipe.allInputs.map {
- val entryStack = SBItemEntryDefinition.getEntry(SkyblockId(it.itemId))
- EntryIngredient.of(entryStack)
- }
+ return neuRecipe.allInputs
+ .filter { it.itemId != NEUIngredient.NEU_SENTINEL_EMPTY }
+ .map {
+ val entryStack = SBItemEntryDefinition.getEntry(SkyblockId(it.itemId))
+ EntryIngredient.of(entryStack)
+ }
}
override fun getOutputEntries(): List<EntryIngredient> {
- return neuRecipe.allOutputs.map {
- val entryStack = SBItemEntryDefinition.getEntry(SkyblockId(it.itemId))
- EntryIngredient.of(entryStack)
- }
+ return neuRecipe.allOutputs
+ .filter { it.itemId != NEUIngredient.NEU_SENTINEL_EMPTY }
+ .map {
+ val entryStack = SBItemEntryDefinition.getEntry(SkyblockId(it.itemId))
+ EntryIngredient.of(entryStack)
+ }
}
}