From d0a88fb839e4da24e22cc67bfb7e863a6c64e4c3 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Thu, 15 Sep 2022 21:09:08 +0700 Subject: [PATCH] =?UTF-8?q?YuRaNnNzZZ=20=E2=80=94=20=D0=92=D1=87=D0=B5?= =?UTF-8?q?=D1=80=D0=B0,=20=D0=B2=201:12=20=D0=B0=20=D0=BA=D0=B0=D0=BA?= =?UTF-8?q?=D0=BE=D0=B9=20=D0=B2=D1=8B=D1=85=D0=BE=D0=B4=20=D0=B1=D1=83?= =?UTF-8?q?=D0=B4=D0=B5=D1=82=20=D1=82=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/compat/jei/PlatePressRecipeCategory.kt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jei/PlatePressRecipeCategory.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jei/PlatePressRecipeCategory.kt index abcbd4448..eacabf685 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jei/PlatePressRecipeCategory.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jei/PlatePressRecipeCategory.kt @@ -11,6 +11,7 @@ import mezz.jei.api.recipe.category.IRecipeCategory import net.minecraft.network.chat.Component import net.minecraft.resources.ResourceLocation import net.minecraft.world.item.ItemStack +import net.minecraft.world.item.crafting.Ingredient import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.client.render.TextAlign @@ -19,6 +20,7 @@ import ru.dbotthepony.mc.otm.client.screen.panels.AbstractSlotPanel import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel import ru.dbotthepony.mc.otm.core.RGBAColor import ru.dbotthepony.mc.otm.core.TranslatableComponent +import ru.dbotthepony.mc.otm.core.registryName import ru.dbotthepony.mc.otm.recipe.PlatePressRecipe import ru.dbotthepony.mc.otm.registry.MItems @@ -94,7 +96,13 @@ object PlatePressRecipeCategory : IRecipeCategory, IDrawable { builder.addSlot(RecipeIngredientRole.INPUT, X_INPUT.toInt() + 1, Y_INPUT.toInt() + 1) .addIngredients(recipe.input) - builder.addSlot(RecipeIngredientRole.OUTPUT, X_OUTPUT.toInt() + 1, Y_OUTPUT.toInt() + 1) - .addIngredients(recipe.output) + val first = recipe.output.items.firstOrNull { it.item.registryName?.namespace == OverdriveThatMatters.MOD_ID } + + if (first == null) + builder.addSlot(RecipeIngredientRole.OUTPUT, X_OUTPUT.toInt() + 1, Y_OUTPUT.toInt() + 1) + .addIngredients(recipe.output) + else + builder.addSlot(RecipeIngredientRole.OUTPUT, X_OUTPUT.toInt() + 1, Y_OUTPUT.toInt() + 1) + .addIngredients(Ingredient.of(first)) } }