YuRaNnNzZZ — Вчера, в 1:12
а какой выход будет то
This commit is contained in:
parent
c9c43b2093
commit
d0a88fb839
@ -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<PlatePressRecipe>, 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))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user