diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-11-20 12:49:54 +0100 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-11-20 12:49:54 +0100 |
| commit | 709c32ed2788c15f9f03a1bcbe6648e533e662c6 (patch) | |
| tree | a895baaade1b0c01ce51340a63dfb6d0b5777f9e /src/main/kotlin/repo | |
| parent | 5d9b084be9af0f97adad002f3389add22ebf07e5 (diff) | |
| download | Firmament-709c32ed2788c15f9f03a1bcbe6648e533e662c6.tar.gz Firmament-709c32ed2788c15f9f03a1bcbe6648e533e662c6.tar.bz2 Firmament-709c32ed2788c15f9f03a1bcbe6648e533e662c6.zip | |
feat: basic screen recipe renderer
Diffstat (limited to 'src/main/kotlin/repo')
| -rw-r--r-- | src/main/kotlin/repo/recipes/GenericRecipeRenderer.kt | 2 | ||||
| -rw-r--r-- | src/main/kotlin/repo/recipes/RecipeLayouter.kt | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/main/kotlin/repo/recipes/GenericRecipeRenderer.kt b/src/main/kotlin/repo/recipes/GenericRecipeRenderer.kt index c029494..84f1f48 100644 --- a/src/main/kotlin/repo/recipes/GenericRecipeRenderer.kt +++ b/src/main/kotlin/repo/recipes/GenericRecipeRenderer.kt @@ -16,6 +16,8 @@ interface GenericRecipeRenderer<T : Any> { 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> } diff --git a/src/main/kotlin/repo/recipes/RecipeLayouter.kt b/src/main/kotlin/repo/recipes/RecipeLayouter.kt index b211d9c..7a63941 100644 --- a/src/main/kotlin/repo/recipes/RecipeLayouter.kt +++ b/src/main/kotlin/repo/recipes/RecipeLayouter.kt @@ -18,7 +18,8 @@ interface RecipeLayouter { * Create a bigger background and mark the slot as output. The coordinates should still refer the upper left corner of the item stack, not of the bigger background. */ BIG_OUTPUT, - DISPLAY, + DISPLAY,; + val isBig get() = this == BIG_OUTPUT } @@ -32,7 +33,7 @@ interface RecipeLayouter { x: Int, y: Int, content: SBItemStack?, slotKind: SlotKind, - ): ItemSlot + ): ItemSlot = createCyclingItemSlot(x, y, listOfNotNull(content), slotKind) interface CyclingItemSlot : ItemSlot { fun onUpdate(action: () -> Unit) @@ -59,7 +60,7 @@ interface RecipeLayouter { fun createArrow(x: Int, y: Int): Rectangle fun createMoulConfig(x: Int, y: Int, w: Int, h: Int, component: GuiComponent) - fun createFire(ingredientsCenter: Point, animationTicks: Int) + fun createFire(point: Point, animationTicks: Int) fun createEntity(rectangle: Rectangle, entity: LivingEntity) } |
