From 92f6f47058559bf106c4e24474cccf9ef6f7d9e6 Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Fri, 9 Jul 2021 11:12:13 +0300 Subject: [PATCH] Infusion REI recipe fix --- gradle.properties | 2 +- .../integration/rei/REIInfusionCategory.java | 25 ++++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9e25e84c..a5a63da9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ yarn_mappings= 6 loader_version= 0.11.6 # Mod Properties -mod_version = 0.10.0-pre +mod_version = 0.10.1-pre maven_group = ru.betterend archives_base_name = better-end diff --git a/src/main/java/ru/betterend/integration/rei/REIInfusionCategory.java b/src/main/java/ru/betterend/integration/rei/REIInfusionCategory.java index f974e304..a390f2c3 100644 --- a/src/main/java/ru/betterend/integration/rei/REIInfusionCategory.java +++ b/src/main/java/ru/betterend/integration/rei/REIInfusionCategory.java @@ -18,6 +18,7 @@ import org.jetbrains.annotations.NotNull; import ru.betterend.BetterEnd; import ru.betterend.registry.EndBlocks; +import java.util.ArrayList; import java.util.List; public class REIInfusionCategory implements TransferDisplayCategory { @@ -44,7 +45,6 @@ public class REIInfusionCategory implements TransferDisplayCategory setupDisplay(REIInfusionDisplay display, Rectangle bounds) { Point centerPoint = new Point(bounds.getCenterX() - 34, bounds.getCenterY() - 2); @@ -52,6 +52,14 @@ public class REIInfusionCategory implements TransferDisplayCategory inputEntries = display.getInputEntries(); List outputEntries = display.getOutputEntries(); + if (inputEntries.size() < 9) { + List newList = new ArrayList(9); + newList.addAll(inputEntries); + for (int i = inputEntries.size(); i < 9; i++) { + newList.add(EntryIngredient.empty()); + } + inputEntries = newList; + } widgets.add(Widgets.createTexturedWidget(BACKGROUND, bounds.x, bounds.y, 0, 0, 150, 104, 150, 104)); widgets.add(Widgets.createSlot(centerPoint).entries(inputEntries.get(0)).disableBackground().markInput()); widgets.add(Widgets.createSlot(new Point(centerPoint.x, centerPoint.y - 28)).entries(inputEntries.get(1)).disableBackground().markInput()); @@ -63,8 +71,15 @@ public class REIInfusionCategory implements TransferDisplayCategory widgets, Rectangle bounds, REIInfusionDisplay display, IntList redSlots) { - - } + public void renderRedSlots(PoseStack matrices, List widgets, Rectangle bounds, REIInfusionDisplay display, IntList redSlots) {} }