From 69a855f33483c3a5273f6f337c95fb51aad5d2b4 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Wed, 26 Feb 2020 00:35:20 +0800 Subject: improved notice filtering Signed-off-by: shedaniel --- .../me/shedaniel/rei/gui/widget/EntryWidget.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java') 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); } -- cgit