Skip to content

Commit b9295bc

Browse files
committed
fix off-center multiblock item lists
1 parent d5a1cbe commit b9295bc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/java/gregtech/integration/jei/multiblock/MultiblockInfoRecipeWrapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
import java.util.stream.Collectors;
5959

6060
public class MultiblockInfoRecipeWrapper implements IRecipeWrapper {
61-
private static final int MAX_PARTS = 20;
61+
private static final int MAX_PARTS = 18;
6262
private static final int PARTS_HEIGHT = 36;
6363
private final int SLOT_SIZE = 18;
64-
private final int SLOTS_PER_ROW = 10;
64+
private final int SLOTS_PER_ROW = 9;
6565
private final int ICON_SIZE = 20;
6666
private final int RIGHT_PADDING = 5;
6767

@@ -216,7 +216,7 @@ private void preparePlaceForParts(int recipeHeight) {
216216
IGuiItemStackGroup itemStackGroup = recipeLayout.getItemStacks();
217217

218218
for (int i = 0; i < MAX_PARTS; ++i)
219-
itemStackGroup.init(i, true, SLOT_SIZE * i - (SLOT_SIZE * SLOTS_PER_ROW) * (i / SLOTS_PER_ROW), recipeHeight - PARTS_HEIGHT + SLOT_SIZE * (i / SLOTS_PER_ROW));
219+
itemStackGroup.init(i, true, SLOT_SIZE * i - (SLOT_SIZE * SLOTS_PER_ROW) * (i / SLOTS_PER_ROW) + (SLOT_SIZE/ 2) - 2, recipeHeight - PARTS_HEIGHT + SLOT_SIZE * (i / SLOTS_PER_ROW));
220220
}
221221

222222
private void updateParts() {
@@ -243,7 +243,7 @@ public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHe
243243
this.infoIcon.draw(minecraft, recipeWidth - (ICON_SIZE + RIGHT_PADDING), 49);
244244

245245
for (int i = 0; i < MAX_PARTS; ++i) {
246-
this.slot.draw(minecraft, SLOT_SIZE * i - (SLOTS_PER_ROW * SLOT_SIZE) * (i / SLOTS_PER_ROW), sceneHeight + SLOT_SIZE * (i / SLOTS_PER_ROW));
246+
this.slot.draw(minecraft, SLOT_SIZE * i - (SLOTS_PER_ROW * SLOT_SIZE) * (i / SLOTS_PER_ROW) + (SLOT_SIZE / 2) - 2, sceneHeight + SLOT_SIZE * (i / SLOTS_PER_ROW));
247247
}
248248

249249
// Hmmm, the buttons need to be last otherwise sometimes highlighting

0 commit comments

Comments
 (0)