Skip to content

Commit

Permalink
Revert "Revert "Revert "Update JEMI integration"""
Browse files Browse the repository at this point in the history
This reverts commit 962ae26.
  • Loading branch information
emilyploszaj committed Oct 7, 2024
1 parent 6874eb9 commit a74229c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import dev.emi.emi.EmiPort;
import dev.emi.emi.api.stack.EmiIngredient;
import dev.emi.emi.api.stack.EmiStack;
import dev.emi.emi.config.FluidUnit;
import dev.emi.emi.jemi.JemiStack;
import dev.emi.emi.jemi.JemiUtil;
import dev.emi.emi.jemi.impl.JemiRecipeSlot.IngredientRenderer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public class JemiRecipeLayoutBuilder implements IRecipeLayoutBuilder {
public final List<JemiRecipeSlotBuilder> slots = Lists.newArrayList();
public boolean shapeless = false;


@Override
public IRecipeSlotBuilder addSlot(RecipeIngredientRole recipeIngredientRole, int x, int y) {
JemiRecipeSlotBuilder builder = new JemiRecipeSlotBuilder(recipeIngredientRole, x, y);
Expand Down
7 changes: 0 additions & 7 deletions xplat/src/main/java/dev/emi/emi/jemi/impl/JemiRecipeSlot.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package dev.emi.emi.jemi.impl;

import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Stream;

import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Unmodifiable;

import dev.emi.emi.api.stack.EmiIngredient;
import dev.emi.emi.api.stack.EmiStack;
import dev.emi.emi.api.widget.SlotWidget;
Expand All @@ -24,7 +20,6 @@
@SuppressWarnings("unchecked")
public class JemiRecipeSlot implements IRecipeSlotView {
public final RecipeIngredientRole role;
public final boolean large;
public final int x, y;
public final Optional<String> name;
public final IRecipeSlotTooltipCallback tooltipCallback;
Expand All @@ -37,7 +32,6 @@ public class JemiRecipeSlot implements IRecipeSlotView {

public JemiRecipeSlot(JemiRecipeSlotBuilder builder) {
this.role = builder.acceptor.role;
this.large = builder.large;
this.x = builder.x;
this.y = builder.y;
this.name = builder.name;
Expand All @@ -51,7 +45,6 @@ public JemiRecipeSlot(JemiRecipeSlotBuilder builder) {

public JemiRecipeSlot(RecipeIngredientRole role, EmiStack stack) {
this.role = role;
this.large = false;
this.x = 0;
this.y = 0;
this.name = Optional.empty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@

public class JemiRecipeSlotBuilder implements IRecipeSlotBuilder {
public final JemiIngredientAcceptor acceptor;
public boolean large = false;
public int x, y;
public final int x, y;
public Optional<String> name = Optional.empty();
public IRecipeSlotTooltipCallback tooltipCallback;
public OffsetDrawable background, overlay;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class JemiSlotWidget extends SlotWidget {
private final JemiRecipeSlot slot;

public JemiSlotWidget(JemiRecipeSlot slot, EmiRecipe recipe) {
super(slot.stack, slot.x - (slot.large ? 6 : 1) , slot.y - (slot.large ? 6 : 1));
super(slot.stack, slot.x - 1, slot.y - 1);
this.slot = slot;
slot.widget = this;
if (slot.getRole() == RecipeIngredientRole.OUTPUT) {
Expand All @@ -38,8 +38,6 @@ public JemiSlotWidget(JemiRecipeSlot slot, EmiRecipe recipe) {
IIngredientRenderer<?> renderer = getRenderer();
if (renderer != null) {
this.customBackground(null, 0, 0, renderer.getWidth() + 2, renderer.getHeight() + 2);
} else if (slot.large) {
this.large(true);
}
}

Expand Down

0 comments on commit a74229c

Please sign in to comment.