quick fix : Redundant 'if' statement

This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
1 parent 28b094ea1a
commit f384a4fe28
29 files changed
+48 -130

No files matched your search

@@ -268,16 +268,10 @@ public class ToolStationGui extends GuiContainer implements INEIGuiHandler {
@Override
public VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility) {
if (width - xSize < 107) {
currentVisibility.showWidgets = false;
} else {
currentVisibility.showWidgets = true;
}
currentVisibility.showWidgets = width - xSize >= 107;
if (guiLeft < 58) {
currentVisibility.showStateButtons = false;
}
return currentVisibility;
}
@@ -299,9 +293,6 @@ public class ToolStationGui extends GuiContainer implements INEIGuiHandler {
@Override
public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
if (y + h - 4 < guiTop || y + 4 > guiTop + ySize) return false;
if (x - w - 4 < guiLeft - 40 || x + 4 > guiLeft + xSize + 126) return false;
return true;
return x - w - 4 >= guiLeft - 40 && x + 4 <= guiLeft + xSize + 126;
}
}