aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/notenoughupdates/recipes
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-05-05 01:35:04 +0200
committernea <nea@nea.moe>2023-05-05 01:35:04 +0200
commit229f724ef4a0a4cbc426f31e27f9a57e9b1307c9 (patch)
tree4c30bb9be6127aeef4136ea4c60fa7cec4ec7ac0 /src/main/kotlin/moe/nea/notenoughupdates/recipes
parentdc4866fe01abf7b33829bbfcd9d266c381c6c6af (diff)
downloadFirmament-229f724ef4a0a4cbc426f31e27f9a57e9b1307c9.tar.gz
Firmament-229f724ef4a0a4cbc426f31e27f9a57e9b1307c9.tar.bz2
Firmament-229f724ef4a0a4cbc426f31e27f9a57e9b1307c9.zip
Fix clipping
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/recipes')
-rw-r--r--src/main/kotlin/moe/nea/notenoughupdates/recipes/SBForgeRecipe.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/recipes/SBForgeRecipe.kt b/src/main/kotlin/moe/nea/notenoughupdates/recipes/SBForgeRecipe.kt
index 0a81214..a9301ac 100644
--- a/src/main/kotlin/moe/nea/notenoughupdates/recipes/SBForgeRecipe.kt
+++ b/src/main/kotlin/moe/nea/notenoughupdates/recipes/SBForgeRecipe.kt
@@ -29,15 +29,16 @@ class SBForgeRecipe(override val neuRecipe: NEUForgeRecipe) : SBRecipe() {
override fun getIcon(): Renderer = EntryStacks.of(Blocks.ANVIL)
override fun setupDisplay(display: SBForgeRecipe, bounds: Rectangle): List<Widget> {
return buildList {
+ // TODO: proper gui for this (possibly inspired by the old circular gui)
add(Widgets.createRecipeBase(bounds))
- val resultSlot = Point(bounds.centerX - 18 / 2, bounds.centerY + 5)
+ val resultSlot = Point(bounds.centerX, bounds.centerY + 5)
add(Widgets.createResultSlotBackground(resultSlot))
val ingredientsCenter = Point(bounds.centerX, bounds.centerY - 20)
val count = display.neuRecipe.inputs.size
display.neuRecipe.inputs.forEachIndexed { idx, ingredient ->
add(
Widgets.createSlot(
- Point(ingredientsCenter.x - 18 / 2 - count / 2 * 24 + idx * 24, ingredientsCenter.y)
+ Point(ingredientsCenter.x + 12 - count * 24 / 2 + idx * 24, ingredientsCenter.y)
).markInput().entry(SBItemEntryDefinition.getEntry(ingredient))
)
}