aboutsummaryrefslogtreecommitdiff
path: root/api/src/main
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-04-16 21:08:44 +0800
committershedaniel <daniel@shedaniel.me>2021-04-16 21:08:44 +0800
commit5729d39a0f85413b4c4ada56e17514d09c7de4a4 (patch)
tree685f17ca954d98f3b6b9b71b9343a8989aa1a2c0 /api/src/main
parent1450e8283c6a8f0f0d6821046acd8d77f02daecf (diff)
downloadRoughlyEnoughItems-5729d39a0f85413b4c4ada56e17514d09c7de4a4.tar.gz
RoughlyEnoughItems-5729d39a0f85413b4c4ada56e17514d09c7de4a4.tar.bz2
RoughlyEnoughItems-5729d39a0f85413b4c4ada56e17514d09c7de4a4.zip
Fix icons for JEI categories with null icons
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'api/src/main')
-rw-r--r--api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/WidgetWithBounds.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/WidgetWithBounds.java b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/WidgetWithBounds.java
index a303bdd44..d61d58f4d 100644
--- a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/WidgetWithBounds.java
+++ b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/WidgetWithBounds.java
@@ -23,6 +23,7 @@
package me.shedaniel.rei.api.client.gui.widgets;
+import com.mojang.blaze3d.vertex.PoseStack;
import me.shedaniel.math.Rectangle;
public abstract class WidgetWithBounds extends Widget {
@@ -32,4 +33,13 @@ public abstract class WidgetWithBounds extends Widget {
public boolean containsMouse(double mouseX, double mouseY) {
return getBounds().contains(mouseX, mouseY);
}
+
+ @Deprecated
+ @Override
+ public void render(PoseStack matrices, Rectangle bounds, int mouseX, int mouseY, float delta) {
+ Rectangle clone = getBounds().clone();
+ getBounds().setBounds(bounds);
+ render(matrices, mouseX, mouseY, delta);
+ getBounds().setBounds(clone);
+ }
}