Fix sentinel items being displayed in recipes somtimes

This commit is contained in:
Linnea Gräf
2023-12-27 13:16:52 +01:00
parent 2c9c388683
commit 51c9df52fc

View File

@@ -6,25 +6,30 @@
package moe.nea.firmament.rei.recipes package moe.nea.firmament.rei.recipes
import io.github.moulberry.repo.data.NEUIngredient
import io.github.moulberry.repo.data.NEURecipe import io.github.moulberry.repo.data.NEURecipe
import me.shedaniel.rei.api.common.display.Display import me.shedaniel.rei.api.common.display.Display
import me.shedaniel.rei.api.common.entry.EntryIngredient import me.shedaniel.rei.api.common.entry.EntryIngredient
import moe.nea.firmament.rei.SBItemEntryDefinition import moe.nea.firmament.rei.SBItemEntryDefinition
import moe.nea.firmament.util.SkyblockId import moe.nea.firmament.util.SkyblockId
abstract class SBRecipe() : Display { abstract class SBRecipe : Display {
abstract val neuRecipe: NEURecipe abstract val neuRecipe: NEURecipe
override fun getInputEntries(): List<EntryIngredient> { override fun getInputEntries(): List<EntryIngredient> {
return neuRecipe.allInputs.map { return neuRecipe.allInputs
val entryStack = SBItemEntryDefinition.getEntry(SkyblockId(it.itemId)) .filter { it.itemId != NEUIngredient.NEU_SENTINEL_EMPTY }
EntryIngredient.of(entryStack) .map {
} val entryStack = SBItemEntryDefinition.getEntry(SkyblockId(it.itemId))
EntryIngredient.of(entryStack)
}
} }
override fun getOutputEntries(): List<EntryIngredient> { override fun getOutputEntries(): List<EntryIngredient> {
return neuRecipe.allOutputs.map { return neuRecipe.allOutputs
val entryStack = SBItemEntryDefinition.getEntry(SkyblockId(it.itemId)) .filter { it.itemId != NEUIngredient.NEU_SENTINEL_EMPTY }
EntryIngredient.of(entryStack) .map {
} val entryStack = SBItemEntryDefinition.getEntry(SkyblockId(it.itemId))
EntryIngredient.of(entryStack)
}
} }
} }