aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-01-16 16:10:19 +0800
committershedaniel <daniel@shedaniel.me>2020-01-16 16:10:19 +0800
commitb4be45e414504afb49910d766bebcd00f55b052b (patch)
tree05c36b311681a120c0e3c85131531a159fbc59c2 /src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
parent01e8ede4fc41f6f113ae623044c3a4e98ed81eb4 (diff)
downloadRoughlyEnoughItems-b4be45e414504afb49910d766bebcd00f55b052b.tar.gz
RoughlyEnoughItems-b4be45e414504afb49910d766bebcd00f55b052b.tar.bz2
RoughlyEnoughItems-b4be45e414504afb49910d766bebcd00f55b052b.zip
3.3.11
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
index ca3bb420d..17e7e3edf 100644
--- a/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
+++ b/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
@@ -9,6 +9,7 @@ import me.shedaniel.math.api.Rectangle;
import me.shedaniel.rei.api.ClientHelper;
import me.shedaniel.rei.api.EntryStack;
import me.shedaniel.rei.api.RecipeCategory;
+import me.shedaniel.rei.api.annotations.Internal;
import me.shedaniel.rei.impl.ScreenHelper;
import net.minecraft.util.Formatting;
import net.minecraft.util.Identifier;
@@ -16,6 +17,8 @@ import net.minecraft.util.Identifier;
import java.util.Collections;
import java.util.List;
+@Deprecated
+@Internal
public class TabWidget extends WidgetWithBounds {
public static final Identifier CHEST_GUI_TEXTURE = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer.png");
@@ -26,7 +29,7 @@ public class TabWidget extends WidgetWithBounds {
public int id;
public String categoryName;
public Rectangle bounds;
- public RecipeCategory category;
+ public RecipeCategory<?> category;
public int u, v;
public TabWidget(int id, Rectangle bounds) {
@@ -48,7 +51,7 @@ public class TabWidget extends WidgetWithBounds {
this(id, new Rectangle(leftX + id * tabSize, bottomY - tabSize, tabSize, tabSize), u, v);
}
- public void setRenderer(RecipeCategory category, EntryStack logo, String categoryName, boolean selected) {
+ public void setRenderer(RecipeCategory<?> category, EntryStack logo, String categoryName, boolean selected) {
if (logo == null) {
shown = false;
this.logo = null;
@@ -91,7 +94,6 @@ public class TabWidget extends WidgetWithBounds {
}
}
- @SuppressWarnings("deprecation")
private void drawTooltip() {
if (this.minecraft.options.advancedItemTooltips)
ScreenHelper.getLastOverlay().addTooltip(QueuedTooltip.create(categoryName, Formatting.DARK_GRAY.toString() + category.getIdentifier().toString(), ClientHelper.getInstance().getFormattedModFromIdentifier(category.getIdentifier())));