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)) } }