quick fix : Redundant 'if' statement

This commit is contained in:
Alexdoru committed 2023-01-25 23:11:58 +01:00
1 parent ce3ee201a3
commit d0c3b57e22
29 files changed
+48 -130

No files matched your search

@@ -270,11 +270,7 @@ public class PartCrafterGui 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;
@@ -301,9 +297,6 @@ public class PartCrafterGui 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 + DESC_WIDTH) return false;
return true;
return x - w - 4 >= guiLeft - 40 && x + 4 <= guiLeft + xSize + DESC_WIDTH;
}
}