diff options
author | Linnea Gräf <nea@nea.moe> | 2023-12-27 13:16:52 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2023-12-27 13:16:52 +0100 |
commit | 51c9df52fca0332d34706d06f09847ddb1ac2dd5 (patch) | |
tree | f30d020abb06ca7d55123eb8d9fbcda1eee1e962 | |
parent | 2c9c38868345d5e133179597936f8e584075b8de (diff) | |
download | firmament-51c9df52fca0332d34706d06f09847ddb1ac2dd5.tar.gz firmament-51c9df52fca0332d34706d06f09847ddb1ac2dd5.tar.bz2 firmament-51c9df52fca0332d34706d06f09847ddb1ac2dd5.zip |
Fix sentinel items being displayed in recipes somtimes
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/rei/recipes/SBRecipe.kt | 23 |
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) + } } } |