aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-02-26 00:35:20 +0800
committershedaniel <daniel@shedaniel.me>2020-02-26 00:35:20 +0800
commit69a855f33483c3a5273f6f337c95fb51aad5d2b4 (patch)
tree8cec3c7967d95ec386bcf4aabe59b323b23f1103
parent6a943e21ed3c2610ade20c3ba0646da87db65501 (diff)
downloadRoughlyEnoughItems-69a855f33483c3a5273f6f337c95fb51aad5d2b4.tar.gz
RoughlyEnoughItems-69a855f33483c3a5273f6f337c95fb51aad5d2b4.tar.bz2
RoughlyEnoughItems-69a855f33483c3a5273f6f337c95fb51aad5d2b4.zip
improved notice filtering
Signed-off-by: shedaniel <daniel@shedaniel.me>
-rw-r--r--gradle.properties2
-rw-r--r--src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java38
-rw-r--r--src/main/java/me/shedaniel/rei/gui/StackToNoticeScreen.java13
-rw-r--r--src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java18
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java23
-rw-r--r--src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java23
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java12
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/campfire/DefaultCampfireCategory.java4
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java4
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingCategory.java4
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java4
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/stonecutting/DefaultStoneCuttingCategory.java4
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/stripping/DefaultStrippingCategory.java4
15 files changed, 113 insertions, 44 deletions
diff --git a/gradle.properties b/gradle.properties
index f59c7a87f..d7c6ef2ec 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
-mod_version=4.0.4-unstable
+mod_version=4.0.5-unstable
minecraft_version=20w07a
yarn_version=20w07a+build.1
fabricloader_version=0.7.8+build.184
diff --git a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java
index 8b73d7603..45757a4cd 100644
--- a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java
+++ b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java
@@ -39,7 +39,7 @@ import java.util.*;
import java.util.function.Supplier;
@ApiStatus.Internal
-public class RecipeViewingScreen extends Screen {
+public class RecipeViewingScreen extends Screen implements StackToNoticeScreen {
public static final Identifier CHEST_GUI_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png");
private final List<Widget> preWidgets;
@@ -59,7 +59,8 @@ public class RecipeViewingScreen extends Screen {
@Nullable private CategoryBaseWidget workingStationsBaseWidget;
private RecipeCategory<RecipeDisplay> selectedCategory;
private ButtonWidget recipeBack, recipeNext, categoryBack, categoryNext;
- private EntryStack mainStackToNotice = EntryStack.empty();
+ private EntryStack ingredientStackToNotice = EntryStack.empty();
+ private EntryStack resultStackToNotice = EntryStack.empty();
public RecipeViewingScreen(Map<RecipeCategory<?>, List<RecipeDisplay>> categoriesMap) {
super(new LiteralText(""));
@@ -80,14 +81,24 @@ public class RecipeViewingScreen extends Screen {
this.choosePageActivated = false;
}
- static void transformNotice(List<Widget> setupDisplay, EntryStack mainStackToNotice) {
- if (mainStackToNotice.isEmpty())
+ @ApiStatus.Internal
+ static void transformIngredientNotice(List<Widget> setupDisplay, EntryStack noticeStack) {
+ transformNotice(1, setupDisplay, noticeStack);
+ }
+
+ @ApiStatus.Internal
+ static void transformResultNotice(List<Widget> setupDisplay, EntryStack noticeStack) {
+ transformNotice(2, setupDisplay, noticeStack);
+ }
+
+ private static void transformNotice(int marker, List<Widget> setupDisplay, EntryStack noticeStack) {
+ if (noticeStack.isEmpty())
return;
for (Widget widget : setupDisplay) {
if (widget instanceof EntryWidget) {
EntryWidget entry = (EntryWidget) widget;
- if (entry.entries().size() > 1) {
- EntryStack stack = CollectionUtils.findFirstOrNullEqualsEntryIgnoreAmount(entry.entries(), mainStackToNotice);
+ if (entry.getNoticeMark() == marker && entry.entries().size() > 1) {
+ EntryStack stack = CollectionUtils.findFirstOrNullEqualsEntryIgnoreAmount(entry.entries(), noticeStack);
if (stack != null) {
entry.clearStacks();
entry.entry(stack);
@@ -97,8 +108,16 @@ public class RecipeViewingScreen extends Screen {
}
}
- public void addMainStackToNotice(EntryStack stack) {
- this.mainStackToNotice = stack;
+ @ApiStatus.Internal
+ @Override
+ public void addIngredientStackToNotice(EntryStack stack) {
+ this.ingredientStackToNotice = stack;
+ }
+
+ @ApiStatus.Internal
+ @Override
+ public void addResultStackToNotice(EntryStack stack) {
+ this.resultStackToNotice = stack;
}
@Nullable
@@ -271,7 +290,8 @@ public class RecipeViewingScreen extends Screen {
int displayWidth = selectedCategory.getDisplayWidth(displaySupplier.get());
final Rectangle displayBounds = new Rectangle(getBounds().getCenterX() - displayWidth / 2, getBounds().y - 2 + 36 + recipeHeight * i + 4 * i, displayWidth, recipeHeight);
List<Widget> setupDisplay = selectedCategory.setupDisplay(displaySupplier, displayBounds);
- transformNotice(setupDisplay, mainStackToNotice);
+ transformIngredientNotice(setupDisplay, ingredientStackToNotice);
+ transformResultNotice(setupDisplay, resultStackToNotice);
recipeBounds.put(displayBounds, setupDisplay);
this.widgets.addAll(setupDisplay);
if (supplier.isPresent() && supplier.get().get(displayBounds) != null)
diff --git a/src/main/java/me/shedaniel/rei/gui/StackToNoticeScreen.java b/src/main/java/me/shedaniel/rei/gui/StackToNoticeScreen.java
new file mode 100644
index 000000000..3101df21d
--- /dev/null
+++ b/src/main/java/me/shedaniel/rei/gui/StackToNoticeScreen.java
@@ -0,0 +1,13 @@
+package me.shedaniel.rei.gui;
+
+import me.shedaniel.rei.api.EntryStack;
+import org.jetbrains.annotations.ApiStatus;
+
+@ApiStatus.Internal
+public interface StackToNoticeScreen {
+ @ApiStatus.Internal
+ void addIngredientStackToNotice(EntryStack stack);
+
+ @ApiStatus.Internal
+ void addResultStackToNotice(EntryStack stack);
+} \ No newline at end of file
diff --git a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
index 133827ee2..10f2d21f6 100644
--- a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
+++ b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
@@ -40,7 +40,7 @@ import java.util.Map;
import java.util.Optional;
@ApiStatus.Internal
-public class VillagerRecipeViewingScreen extends Screen {
+public class VillagerRecipeViewingScreen extends Screen implements StackToNoticeScreen {
private final Map<RecipeCategory<?>, List<RecipeDisplay>> categoryMap;
private final List<RecipeCategory<?>> categories;
@@ -60,7 +60,8 @@ public class VillagerRecipeViewingScreen extends Screen {
private long scrollBarAlphaFutureTime = -1;
private boolean draggingScrollBar;
private int tabsPage;
- private EntryStack mainStackToNotice = EntryStack.empty();
+ private EntryStack ingredientStackToNotice = EntryStack.empty();
+ private EntryStack resultStackToNotice = EntryStack.empty();
public VillagerRecipeViewingScreen(Map<RecipeCategory<?>, List<RecipeDisplay>> map) {
super(new LiteralText(""));
@@ -85,8 +86,14 @@ public class VillagerRecipeViewingScreen extends Screen {
});
}
- public void addMainStackToNotice(EntryStack stack) {
- this.mainStackToNotice = stack;
+ @Override
+ public void addIngredientStackToNotice(EntryStack stack) {
+ ingredientStackToNotice = stack;
+ }
+
+ @Override
+ public void addResultStackToNotice(EntryStack stack) {
+ resultStackToNotice = stack;
}
@Override
@@ -138,7 +145,8 @@ public class VillagerRecipeViewingScreen extends Screen {
Rectangle recipeBounds = new Rectangle(bounds.x + 100 + (guiWidth - 100) / 2 - category.getDisplayWidth(display) / 2, bounds.y + bounds.height / 2 - category.getDisplayHeight() / 2, category.getDisplayWidth(display), category.getDisplayHeight());
List<Widget> setupDisplay = category.setupDisplay(() -> display, recipeBounds);
- RecipeViewingScreen.transformNotice(setupDisplay, mainStackToNotice);
+ RecipeViewingScreen.transformIngredientNotice(setupDisplay, ingredientStackToNotice);
+ RecipeViewingScreen.transformResultNotice(setupDisplay, resultStackToNotice);
this.widgets.addAll(setupDisplay);
Optional<ButtonAreaSupplier> supplier = RecipeHelper.getInstance().getAutoCraftButtonArea(category);
if (supplier.isPresent() && supplier.get().get(recipeBounds) != null)
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java
index 99aa3dd6a..58fe953e4 100644
--- a/src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java
+++ b/src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java
@@ -23,6 +23,7 @@ import net.minecraft.client.sound.PositionedSoundInstance;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
+import org.jetbrains.annotations.ApiStatus;
import java.util.*;
@@ -31,6 +32,8 @@ public class EntryWidget extends WidgetWithBounds {
protected static final Identifier RECIPE_GUI = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png");
protected static final Identifier RECIPE_GUI_DARK = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer_dark.png");
+ @ApiStatus.Internal
+ private byte noticeMark = 0;
protected boolean highlight = true;
protected boolean tooltips = true;
protected boolean background = true;
@@ -56,6 +59,26 @@ public class EntryWidget extends WidgetWithBounds {
return new EntryWidget(point);
}
+ public EntryWidget unmarkInputOrOutput() {
+ noticeMark = 0;
+ return this;
+ }
+
+ public EntryWidget markIsInput() {
+ noticeMark = 1;
+ return this;
+ }
+
+ public EntryWidget markIsOutput() {
+ noticeMark = 2;
+ return this;
+ }
+
+ @ApiStatus.Internal
+ public byte getNoticeMark() {
+ return noticeMark;
+ }
+
public EntryWidget disableInteractions() {
return interactable(false);
}
diff --git a/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java b/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java
index 2eb18a6ee..1e8b59921 100644
--- a/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java
+++ b/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java
@@ -15,6 +15,7 @@ import me.shedaniel.rei.RoughlyEnoughItemsNetwork;
import me.shedaniel.rei.api.*;
import me.shedaniel.rei.gui.PreRecipeViewingScreen;
import me.shedaniel.rei.gui.RecipeViewingScreen;
+import me.shedaniel.rei.gui.StackToNoticeScreen;
import me.shedaniel.rei.gui.VillagerRecipeViewingScreen;
import me.shedaniel.rei.gui.config.RecipeScreenType;
import me.shedaniel.rei.utils.CollectionUtils;
@@ -37,6 +38,7 @@ import net.minecraft.util.Lazy;
import net.minecraft.util.PacketByteBuf;
import net.minecraft.util.registry.Registry;
import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.Nullable;
import java.lang.reflect.Field;
import java.time.LocalDateTime;
@@ -156,7 +158,7 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer {
public boolean executeRecipeKeyBind(EntryStack stack) {
Map<RecipeCategory<?>, List<RecipeDisplay>> map = RecipeHelper.getInstance().getRecipesFor(stack);
if (map.keySet().size() > 0)
- openRecipeViewingScreen(map, stack);
+ openRecipeViewingScreen(map, null, stack);
return map.keySet().size() > 0;
}
@@ -164,7 +166,7 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer {
public boolean executeUsageKeyBind(EntryStack stack) {
Map<RecipeCategory<?>, List<RecipeDisplay>> map = RecipeHelper.getInstance().getUsagesFor(stack);
if (map.keySet().size() > 0)
- openRecipeViewingScreen(map, stack);
+ openRecipeViewingScreen(map, stack, null);
return map.keySet().size() > 0;
}
@@ -212,25 +214,28 @@ public class ClientHelperImpl implements ClientHelper, ClientModInitializer {
@Override
public void openRecipeViewingScreen(Map<RecipeCategory<?>, List<RecipeDisplay>> map) {
- openRecipeViewingScreen(map, null);
+ openRecipeViewingScreen(map, null, null);
}
- public void openRecipeViewingScreen(Map<RecipeCategory<?>, List<RecipeDisplay>> map, EntryStack notice) {
+ @ApiStatus.Internal
+ public void openRecipeViewingScreen(Map<RecipeCategory<?>, List<RecipeDisplay>> map, @Nullable EntryStack ingredientNotice, @Nullable EntryStack resultNotice) {
Screen screen;
if (ConfigObject.getInstance().getRecipeScreenType() == RecipeScreenType.VILLAGER) {
screen = new VillagerRecipeViewingScreen(map);
- if (notice != null)
- ((VillagerRecipeViewingScreen) screen).addMainStackToNotice(notice);
} else if (ConfigObject.getInstance().getRecipeScreenType() == RecipeScreenType.UNSET) {
screen = new PreRecipeViewingScreen(ScreenHelper.getLastContainerScreen(), RecipeScreenType.UNSET, true, original -> {
ConfigObject.getInstance().setRecipeScreenType(original ? RecipeScreenType.ORIGINAL : RecipeScreenType.VILLAGER);
ConfigManager.getInstance().saveConfig();
- openRecipeViewingScreen(map, notice);
+ openRecipeViewingScreen(map, ingredientNotice, resultNotice);
});
} else {
screen = new RecipeViewingScreen(map);
- if (notice != null)
- ((RecipeViewingScreen) screen).addMainStackToNotice(notice);
+ }
+ if (screen instanceof StackToNoticeScreen) {
+ if (ingredientNotice != null)
+ ((StackToNoticeScreen) screen).addIngredientStackToNotice(ingredientNotice);
+ if (resultNotice != null)
+ ((StackToNoticeScreen) screen).addResultStackToNotice(resultNotice);
}
ScreenHelper.storeRecipeScreen(MinecraftClient.getInstance().currentScreen);
MinecraftClient.getInstance().openScreen(screen);
diff --git a/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java b/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java
index 201b47658..86a771f73 100644
--- a/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java
@@ -56,12 +56,12 @@ public class DefaultBrewingCategory implements RecipeCategory<DefaultBrewingDisp
blit(startPoint.x + 44, startPoint.y + 28, 103, 163, width, 4);
}
}));
- widgets.add(EntryWidget.create(startPoint.x + 1, startPoint.y + 1).entry(EntryStack.create(Items.BLAZE_POWDER)).noBackground());
- widgets.add(EntryWidget.create(startPoint.x + 40, startPoint.y + 1).entries(recipeDisplay.getInputEntries().get(0)).noBackground());
- widgets.add(EntryWidget.create(startPoint.x + 63, startPoint.y + 1).entries(recipeDisplay.getInputEntries().get(1)).noBackground());
- widgets.add(EntryWidget.create(startPoint.x + 40, startPoint.y + 35).entries(recipeDisplay.getOutput(0)).noBackground());
- widgets.add(EntryWidget.create(startPoint.x + 63, startPoint.y + 42).entries(recipeDisplay.getOutput(1)).noBackground());
- widgets.add(EntryWidget.create(startPoint.x + 86, startPoint.y + 35).entries(recipeDisplay.getOutput(2)).noBackground());
+ widgets.add(EntryWidget.create(startPoint.x + 1, startPoint.y + 1).entry(EntryStack.create(Items.BLAZE_POWDER)).noBackground().markIsInput());
+ widgets.add(EntryWidget.create(startPoint.x + 40, startPoint.y + 1).entries(recipeDisplay.getInputEntries().get(0)).noBackground().markIsInput());
+ widgets.add(EntryWidget.create(startPoint.x + 63, startPoint.y + 1).entries(recipeDisplay.getInputEntries().get(1)).noBackground().markIsInput());
+ widgets.add(EntryWidget.create(startPoint.x + 40, startPoint.y + 35).entries(recipeDisplay.getOutput(0)).noBackground().markIsOutput());
+ widgets.add(EntryWidget.create(startPoint.x + 63, startPoint.y + 42).entries(recipeDisplay.getOutput(1)).noBackground().markIsOutput());
+ widgets.add(EntryWidget.create(startPoint.x + 86, startPoint.y + 35).entries(recipeDisplay.getOutput(2)).noBackground().markIsOutput());
return widgets;
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/campfire/DefaultCampfireCategory.java b/src/main/java/me/shedaniel/rei/plugin/campfire/DefaultCampfireCategory.java
index 8283492af..e8876b2be 100644
--- a/src/main/java/me/shedaniel/rei/plugin/campfire/DefaultCampfireCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/campfire/DefaultCampfireCategory.java
@@ -63,8 +63,8 @@ public class DefaultCampfireCategory implements RecipeCategory<DefaultCampfireDi
}
}));
widgets.add(RecipeArrowWidget.create(new Point(startPoint.x + 24, startPoint.y + 8), true).time(cookingTime * 50));
- widgets.add(EntryWidget.create(startPoint.x + 1, startPoint.y + 1).entries(recipeDisplaySupplier.get().getInputEntries().get(0)));
- widgets.add(EntryWidget.create(startPoint.x + 61, startPoint.y + 9).entries(recipeDisplaySupplier.get().getOutputEntries()).noBackground());
+ widgets.add(EntryWidget.create(startPoint.x + 1, startPoint.y + 1).entries(recipeDisplaySupplier.get().getInputEntries().get(0)).markIsInput());
+ widgets.add(EntryWidget.create(startPoint.x + 61, startPoint.y + 9).entries(recipeDisplaySupplier.get().getOutputEntries()).noBackground().markIsOutput());
return widgets;
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java b/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java
index b996827ea..402e1d1ec 100644
--- a/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java
@@ -93,10 +93,10 @@ public class DefaultCompostingCategory implements RecipeCategory<DefaultComposti
break;
}
}
- widgets.add(EntryWidget.create(bounds.getCenterX() - 72 + x * 18, bounds.y + 3 + y * 18).entry(entryStack));
+ widgets.add(EntryWidget.create(bounds.getCenterX() - 72 + x * 18, bounds.y + 3 + y * 18).entry(entryStack).markIsInput());
i++;
}
- widgets.add(EntryWidget.create(startingPoint.x + 33, startingPoint.y + 8).entries(recipeDisplaySupplier.get().getOutputEntries()).noBackground());
+ widgets.add(EntryWidget.create(startingPoint.x + 33, startingPoint.y + 8).entries(recipeDisplaySupplier.get().getOutputEntries()).noBackground().markIsOutput());
return widgets;
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingCategory.java b/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingCategory.java
index a1e8aedc9..37735b3eb 100644
--- a/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingCategory.java
@@ -72,8 +72,8 @@ public class DefaultCookingCategory implements TransferRecipeCategory<DefaultCoo
}
}));
widgets.add(RecipeArrowWidget.create(new Point(startPoint.x + 24, startPoint.y + 8), true).time(cookingTime * 50));
- widgets.add(EntryWidget.create(startPoint.x + 1, startPoint.y + 1).entries(recipeDisplaySupplier.get().getInputEntries().get(0)));
- widgets.add(EntryWidget.create(startPoint.x + 61, startPoint.y + 9).entries(recipeDisplaySupplier.get().getOutputEntries()).noBackground());
+ widgets.add(EntryWidget.create(startPoint.x + 1, startPoint.y + 1).entries(recipeDisplaySupplier.get().getInputEntries().get(0)).markIsInput());
+ widgets.add(EntryWidget.create(startPoint.x + 61, startPoint.y + 9).entries(recipeDisplaySupplier.get().getOutputEntries()).noBackground().markIsOutput());
return widgets;
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java b/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java
index 53dacadd3..03b506344 100644
--- a/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java
@@ -69,7 +69,7 @@ public class DefaultCraftingCategory implements TransferRecipeCategory<DefaultCr
List<EntryWidget> slots = Lists.newArrayList();
for (int y = 0; y < 3; y++)
for (int x = 0; x < 3; x++)
- slots.add(EntryWidget.create(startPoint.x + 1 + x * 18, startPoint.y + 1 + y * 18));
+ slots.add(EntryWidget.create(startPoint.x + 1 + x * 18, startPoint.y + 1 + y * 18).markIsInput());
for (int i = 0; i < input.size(); i++) {
if (recipeDisplaySupplier.get() instanceof DefaultShapedDisplay) {
if (!input.get(i).isEmpty())
@@ -78,7 +78,7 @@ public class DefaultCraftingCategory implements TransferRecipeCategory<DefaultCr
slots.get(i).entries(input.get(i));
}
widgets.addAll(slots);
- widgets.add(EntryWidget.create(startPoint.x + 95, startPoint.y + 19).entries(recipeDisplaySupplier.get().getOutputEntries()).noBackground());
+ widgets.add(EntryWidget.create(startPoint.x + 95, startPoint.y + 19).entries(recipeDisplaySupplier.get().getOutputEntries()).noBackground().markIsOutput());
return widgets;
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java b/src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java
index 9d27f9e97..3a9e66713 100644
--- a/src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java
@@ -68,7 +68,7 @@ public class DefaultFuelCategory implements RecipeCategory<DefaultFuelDisplay> {
minecraft.textRenderer.draw(I18n.translate("category.rei.fuel.time.items", burnItems), bounds.x + 26, bounds.getMaxY() - 15, ScreenHelper.isDarkModeEnabled() ? 0xFFBBBBBB : 0xFF404040);
}
}));
- widgets.add(EntryWidget.create(bounds.x + 6, startPoint.y + 18).entries(recipeDisplaySupplier.get().getInputEntries().get(0)));
+ widgets.add(EntryWidget.create(bounds.x + 6, startPoint.y + 18).entries(recipeDisplaySupplier.get().getInputEntries().get(0)).markIsInput());
return widgets;
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java b/src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java
index 11dba92f4..2e4ed144e 100644
--- a/src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java
@@ -100,7 +100,7 @@ public class DefaultInformationCategory implements RecipeCategory<DefaultInforma
DefaultInformationDisplay display = recipeDisplaySupplier.get();
List<Widget> widgets = Lists.newArrayList();
widgets.add(LabelWidget.create(new Point(bounds.getCenterX(), bounds.y + 3), display.getName().asFormattedString()).noShadow().color(ScreenHelper.isDarkModeEnabled() ? 0xFFBBBBBB : 0xFF404040));
- widgets.add(EntryWidget.create(bounds.getCenterX() - 8, bounds.y + 15).entries(display.getEntryStacks()));
+ widgets.add(EntryWidget.create(bounds.getCenterX() - 8, bounds.y + 15).entries(display.getEntryStacks()).markIsInput());
Rectangle rectangle = new Rectangle(bounds.getCenterX() - (bounds.width / 2), bounds.y + 35, bounds.width, bounds.height - 40);
widgets.add(new SlotBaseWidget(rectangle));
widgets.add(new ScrollableTextWidget(rectangle, display.getTexts()));
diff --git a/src/main/java/me/shedaniel/rei/plugin/stonecutting/DefaultStoneCuttingCategory.java b/src/main/java/me/shedaniel/rei/plugin/stonecutting/DefaultStoneCuttingCategory.java
index 5819157b1..f8eb6051a 100644
--- a/src/main/java/me/shedaniel/rei/plugin/stonecutting/DefaultStoneCuttingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/stonecutting/DefaultStoneCuttingCategory.java
@@ -51,8 +51,8 @@ public class DefaultStoneCuttingCategory implements RecipeCategory<DefaultStoneC
blit(startPoint.x, startPoint.y, 0, 221, 82, 26);
}
}));
- widgets.add(EntryWidget.create(startPoint.x + 4, startPoint.y + 5).entries(recipeDisplaySupplier.get().getInputEntries().get(0)).noBackground());
- widgets.add(EntryWidget.create(startPoint.x + 61, startPoint.y + 5).entries(recipeDisplaySupplier.get().getOutputEntries()).noBackground());
+ widgets.add(EntryWidget.create(startPoint.x + 4, startPoint.y + 5).entries(recipeDisplaySupplier.get().getInputEntries().get(0)).noBackground().markIsInput());
+ widgets.add(EntryWidget.create(startPoint.x + 61, startPoint.y + 5).entries(recipeDisplaySupplier.get().getOutputEntries()).noBackground().markIsOutput());
return widgets;
}
diff --git a/src/main/java/me/shedaniel/rei/plugin/stripping/DefaultStrippingCategory.java b/src/main/java/me/shedaniel/rei/plugin/stripping/DefaultStrippingCategory.java
index 6c0e132fc..b75212e98 100644
--- a/src/main/java/me/shedaniel/rei/plugin/stripping/DefaultStrippingCategory.java
+++ b/src/main/java/me/shedaniel/rei/plugin/stripping/DefaultStrippingCategory.java
@@ -51,8 +51,8 @@ public class DefaultStrippingCategory implements RecipeCategory<DefaultStripping
blit(startPoint.x, startPoint.y, 0, 221, 82, 26);
}
}));
- widgets.add(EntryWidget.create(startPoint.x + 4, startPoint.y + 5).entry(recipeDisplaySupplier.get().getIn()));
- widgets.add(EntryWidget.create(startPoint.x + 61, startPoint.y + 5).entry(recipeDisplaySupplier.get().getOut()).noBackground());
+ widgets.add(EntryWidget.create(startPoint.x + 4, startPoint.y + 5).entry(recipeDisplaySupplier.get().getIn()).markIsInput());
+ widgets.add(EntryWidget.create(startPoint.x + 61, startPoint.y + 5).entry(recipeDisplaySupplier.get().getOut()).noBackground().markIsOutput());
return widgets;
}