Fix sentinel items being displayed in recipes somtimes
This commit is contained in:
@@ -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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user