From 9e990de7685960391d78ca2cca0ff68bebe1a8cd Mon Sep 17 00:00:00 2001 From: shedaniel Date: Mon, 16 Mar 2020 16:19:25 +0800 Subject: 4.0.13 Signed-off-by: shedaniel --- src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java') diff --git a/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java b/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java index ade913478..5cf1ad13a 100644 --- a/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java +++ b/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java @@ -44,7 +44,7 @@ public final class PanelWidget extends Panel { private static final Identifier CHEST_GUI_TEXTURE_DARK = new Identifier("roughlyenoughitems", "textures/gui/recipecontainer_dark.png"); private static final PanelWidget TEMP = new PanelWidget(new Rectangle()); - private Rectangle bounds; + private me.shedaniel.math.api.Rectangle bounds; private int color = -1; private int innerColor = REIHelper.getInstance().isDarkThemeEnabled() ? -13750738 : -3750202; private int xTextureOffset = 0; @@ -56,12 +56,12 @@ public final class PanelWidget extends Panel { return ConfigObject.getInstance().getRecipeScreenType() != RecipeScreenType.VILLAGER; } - public PanelWidget(Rectangle bounds) { - this.bounds = bounds; + public PanelWidget(@NotNull Rectangle bounds) { + this.bounds = new me.shedaniel.math.api.Rectangle(bounds); } - public static void render(Rectangle bounds, int color) { - TEMP.bounds = bounds; + public static void render(@NotNull Rectangle bounds, int color) { + TEMP.bounds.setBounds(bounds); TEMP.color = color; TEMP.render(0, 0, 0); } @@ -118,7 +118,7 @@ public final class PanelWidget extends Panel { @Override public me.shedaniel.math.api.Rectangle getBounds() { - return new me.shedaniel.math.api.Rectangle(bounds); + return bounds; } @Override -- cgit