aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/repo/recipes/GenericRecipeRenderer.kt
blob: 84f1f48acb07bbef136b03c8f382aa760e660d83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package moe.nea.firmament.repo.recipes

import io.github.moulberry.repo.NEURepository
import io.github.moulberry.repo.data.NEURecipe
import me.shedaniel.math.Rectangle
import net.minecraft.world.item.ItemStack
import net.minecraft.network.chat.Component
import net.minecraft.resources.ResourceLocation
import moe.nea.firmament.repo.SBItemStack

interface GenericRecipeRenderer<T : Any> {
	fun render(recipe: T, bounds: Rectangle, layouter: RecipeLayouter, mainItem: SBItemStack?)
	fun getInputs(recipe: T): Collection<SBItemStack>
	fun getOutputs(recipe: T): Collection<SBItemStack>
	val icon: ItemStack
	val title: Component
	val identifier: ResourceLocation
	fun findAllRecipes(neuRepository: NEURepository): Iterable<T>
	fun discoverExtraRecipes(neuRepository: NEURepository, itemStack: SBItemStack, mustBeInOutputs: Boolean): Iterable<T> = emptyList()
	val displayHeight: Int get() = 66
	val displayWidth: Int get() = 150
	val typ: Class<T>
}