diff options
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java | 12 |
1 files changed, 6 insertions, 6 deletions
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 |
