aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
+ }
}
}