diff options
| author | Raven Szewczyk <git@eigenraven.me> | 2023-04-10 17:49:16 +0100 |
|---|---|---|
| committer | Raven Szewczyk <git@eigenraven.me> | 2023-04-10 17:49:16 +0100 |
| commit | 8ac58626bd4caa9e49f58acc6b97ac031f6c2107 (patch) | |
| tree | 0a8c7b737f1f2607fa6875309f4c6a5c2b8b3331 /src/main/java/gregtech/api/gui/widgets | |
| parent | d795cf740c3b48b602d3bfb708ed9e6c492ad37d (diff) | |
| download | GT5-Unofficial-8ac58626bd4caa9e49f58acc6b97ac031f6c2107.tar.gz GT5-Unofficial-8ac58626bd4caa9e49f58acc6b97ac031f6c2107.tar.bz2 GT5-Unofficial-8ac58626bd4caa9e49f58acc6b97ac031f6c2107.zip | |
Update spotless config to 0.2.2
Diffstat (limited to 'src/main/java/gregtech/api/gui/widgets')
9 files changed, 75 insertions, 75 deletions
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java index 5cbee74335..9694316bee 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java @@ -26,8 +26,8 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { // Names of the block a cover could be on private static final String[] SIDES = new String[] { "GT5U.interface.coverTabs.down", "GT5U.interface.coverTabs.up", - "GT5U.interface.coverTabs.north", "GT5U.interface.coverTabs.south", "GT5U.interface.coverTabs.west", - "GT5U.interface.coverTabs.east" }; + "GT5U.interface.coverTabs.north", "GT5U.interface.coverTabs.south", "GT5U.interface.coverTabs.west", + "GT5U.interface.coverTabs.east" }; // Not sure there's a point in JIT translation but that's what this is private String[] translatedSides; @@ -53,8 +53,8 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { * @param colorization The colorization of the GUI we are adding tabs to */ public GT_GuiCoverTabLine(GT_GUIContainerMetaTile_Machine gui, int tabLineLeft, int tabLineTop, int tabHeight, - int tabWidth, int tabSpacing, DisplayStyle xDir, DisplayStyle yDir, DisplayStyle displayMode, - GT_GuiTabIconSet tabBackground, IGregTechTileEntity tile, int colorization) { + int tabWidth, int tabSpacing, DisplayStyle xDir, DisplayStyle yDir, DisplayStyle displayMode, + GT_GuiTabIconSet tabBackground, IGregTechTileEntity tile, int colorization) { super(gui, 6, tabLineLeft, tabLineTop, tabHeight, tabWidth, tabSpacing, xDir, yDir, displayMode, tabBackground); this.tile = tile; this.colorization = colorization; @@ -78,9 +78,9 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { protected void drawBackground(float parTicks, int mouseX, int mouseY) { // Apply this tile's coloration to draw the background GL11.glColor3ub( - (byte) ((colorization >> 16) & 0xFF), - (byte) ((colorization >> 8) & 0xFF), - (byte) (colorization & 0xFF)); + (byte) ((colorization >> 16) & 0xFF), + (byte) ((colorization >> 8) & 0xFF), + (byte) (colorization & 0xFF)); super.drawBackground(parTicks, mouseX, mouseY); } @@ -88,14 +88,14 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { protected void tabClicked(int tabId, int mouseButton) { if (mouseButton == 0 && mTabs[tabId].enabled) { GT_Values.NW.sendToServer( - new GT_Packet_GtTileEntityGuiRequest( - this.tile.getXCoord(), - this.tile.getYCoord(), - this.tile.getZCoord(), - tabId + GT_Proxy.GUI_ID_COVER_SIDE_BASE, - this.tile.getWorld().provider.dimensionId, - Minecraft.getMinecraft().thePlayer.getEntityId(), - 0)); + new GT_Packet_GtTileEntityGuiRequest( + this.tile.getXCoord(), + this.tile.getYCoord(), + this.tile.getZCoord(), + tabId + GT_Proxy.GUI_ID_COVER_SIDE_BASE, + this.tile.getWorld().provider.dimensionId, + Minecraft.getMinecraft().thePlayer.getEntityId(), + 0)); } } @@ -107,7 +107,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { */ private void addCoverToTabs(byte side, ItemStack cover) { final boolean enabled = this.tile.getCoverBehaviorAtSideNew(side) - .hasCoverGUI(); + .hasCoverGUI(); this.setTab(side, cover, null, getTooltipForCoverTab(side, cover, enabled)); this.setTabEnabled(side, enabled); } @@ -123,10 +123,10 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { private String[] getTooltipForCoverTab(byte side, ItemStack cover, boolean enabled) { final List<String> tooltip = cover.getTooltip(Minecraft.getMinecraft().thePlayer, true); tooltip.set( - 0, - (enabled ? EnumChatFormatting.UNDERLINE : EnumChatFormatting.DARK_GRAY) + getSideDescription(side) - + (enabled ? EnumChatFormatting.RESET + ": " : ": " + EnumChatFormatting.RESET) - + tooltip.get(0)); + 0, + (enabled ? EnumChatFormatting.UNDERLINE : EnumChatFormatting.DARK_GRAY) + getSideDescription(side) + + (enabled ? EnumChatFormatting.RESET + ": " : ": " + EnumChatFormatting.RESET) + + tooltip.get(0)); return tooltip.toArray(new String[0]); } @@ -161,7 +161,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { } for (int i = 0; i < tabLine.mTabs.length; i++) { if (tabLine.mTabs[i] != null && tabLine.mTabs[i].getBounds() - .intersects(neiSlotArea)) { + .intersects(neiSlotArea)) { return true; } } diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java index 6d9b1c5db3..0f6a1c9f41 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java @@ -117,13 +117,13 @@ public class GT_GuiFakeItemButton implements IGuiScreen.IGuiElement { GL11.glEnable(GL12.GL_RESCALE_NORMAL); } gui.getItemRenderer() - .renderItemAndEffectIntoGUI( - gui.getFontRenderer(), - Minecraft.getMinecraft() - .getTextureManager(), - item, - xPosition, - yPosition); + .renderItemAndEffectIntoGUI( + gui.getFontRenderer(), + Minecraft.getMinecraft() + .getTextureManager(), + item, + xPosition, + yPosition); if (item.getItem() instanceof ItemBlock) GL11.glPopAttrib(); } diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java index a1876dcc8f..46d213f0f6 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java @@ -61,8 +61,8 @@ public enum GT_GuiIcon implements IGuiIcon { private static final int T_SIZE = 256; private static ResourceLocation[] TEXTURES = { new ResourceLocation(GregTech.ID, "textures/gui/GuiButtons.png"), - new ResourceLocation(GregTech.ID, "textures/gui/GuiCover.png"), - new ResourceLocation(GregTech.ID, "textures/gui/GuiTabs.png"), }; + new ResourceLocation(GregTech.ID, "textures/gui/GuiCover.png"), + new ResourceLocation(GregTech.ID, "textures/gui/GuiTabs.png"), }; public final int x, y, width, height; public final IGuiIcon overlay; @@ -86,12 +86,12 @@ public enum GT_GuiIcon implements IGuiIcon { } public static void render(IGuiIcon icon, double x, double y, double width, double height, double zLevel, - boolean doDraw) { + boolean doDraw) { render(icon, x, y, width, height, zLevel, doDraw, false); } public static void render(IGuiIcon icon, double x, double y, double width, double height, double zLevel, - boolean doDraw, boolean flipHoritontally) { + boolean doDraw, boolean flipHoritontally) { Tessellator tess = Tessellator.instance; if (doDraw) { Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURES[icon.getTexId()]); diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java index 01bbccc599..555d063a3b 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java @@ -48,8 +48,8 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen if (this.visible) { // moused over this.field_146123_n = mouseX >= this.xPosition && mouseY >= this.yPosition - && mouseX < this.xPosition + width - && mouseY < this.yPosition + height; + && mouseX < this.xPosition + width + && mouseY < this.yPosition + height; mouseDragged(mc, mouseX, mouseY); diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java index 636ff0bc26..5b5007fef3 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java @@ -15,7 +15,7 @@ public class GT_GuiIconCheckButton extends GT_GuiIconButton { } public GT_GuiIconCheckButton(IGuiScreen gui, int id, int x, int y, GT_GuiIcon checkedIcon, GT_GuiIcon normalIcon, - String checkedTooltip, String normalTooltip) { + String checkedTooltip, String normalTooltip) { super(gui, id, x, y, normalIcon); this.checkedIcon = checkedIcon; this.normalIcon = normalIcon; diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java index b2430f7b76..ef5348cf77 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java @@ -47,15 +47,15 @@ public class GT_GuiIntegerTextBox extends GuiTextField implements IGuiScreen.IGu @Override public boolean textboxKeyTyped(char c, int key) { if (validChar(c, key) || c == 1 - || c == 3 - || c == 22 - || c == 24 - || key == 14 - || key == 199 - || key == 203 - || key == 205 - || key == 207 - || key == 211) { + || c == 3 + || c == 22 + || c == 24 + || key == 14 + || key == 199 + || key == 203 + || key == 205 + || key == 207 + || key == 211) { return super.textboxKeyTyped(c, key); } return false; diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java index a434be47d3..556de34395 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java @@ -43,7 +43,7 @@ public class GT_GuiTab { * @param flipHorizontally whether to draw this tab on the right side of the IGregTechTileEntity */ public GT_GuiTab(GT_ITabRenderer gui, int id, Rectangle bounds, GT_GuiTabIconSet tabBackground, ItemStack item, - IGuiIcon overlay, String[] tooltipText, boolean flipHorizontally) { + IGuiIcon overlay, String[] tooltipText, boolean flipHorizontally) { this.gui = gui; this.bounds = bounds; this.item = item; @@ -92,14 +92,14 @@ public class GT_GuiTab { public void drawBackground(int mouseX, int mouseY, float parTicks) { if (this.visible) { GT_GuiIcon.render( - getBackgroundTexture(), - bounds.x, - bounds.y, - bounds.width, - bounds.height, - 1, - true, - this.flipHorizontally); + getBackgroundTexture(), + bounds.x, + bounds.y, + bounds.width, + bounds.height, + 1, + true, + this.flipHorizontally); } } @@ -131,13 +131,13 @@ public class GT_GuiTab { } int margin = (bounds.height - SLOT_SIZE); gui.getItemRenderer() - .renderItemAndEffectIntoGUI( - gui.getFontRenderer(), - Minecraft.getMinecraft() - .getTextureManager(), - item, - bounds.x + (this.flipHorizontally ? 0 : margin), - bounds.y + margin); + .renderItemAndEffectIntoGUI( + gui.getFontRenderer(), + Minecraft.getMinecraft() + .getTextureManager(), + item, + bounds.x + (this.flipHorizontally ? 0 : margin), + bounds.y + margin); if (item.getItem() instanceof ItemBlock) GL11.glPopAttrib(); diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java index 01a0f3c8b1..bc9f4437d7 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java @@ -104,8 +104,8 @@ public class GT_GuiTabLine { * @param tabBackground the set of textures used to draw this tab line's tab backgrounds */ public GT_GuiTabLine(GT_ITabRenderer gui, int numTabs, int tabLineLeft, int tabLineTop, int tabHeight, int tabWidth, - int tabSpacing, DisplayStyle xDir, DisplayStyle yDir, DisplayStyle displayMode, - GT_GuiTabIconSet tabBackground) { + int tabSpacing, DisplayStyle xDir, DisplayStyle yDir, DisplayStyle displayMode, + GT_GuiTabIconSet tabBackground) { this.gui = gui; this.mTabs = new GT_GuiTab[numTabs]; this.tabLineLeft = tabLineLeft; @@ -130,14 +130,14 @@ public class GT_GuiTabLine { */ public void setTab(int tabId, ItemStack item, IGuiIcon overlay, String[] text) { mTabs[tabId] = new GT_GuiTab( - this.gui, - tabId, - getBoundsForTab(tabId), - this.tabBackground, - item, - overlay, - text, - this.flipHorizontally); + this.gui, + tabId, + getBoundsForTab(tabId), + this.tabBackground, + item, + overlay, + text, + this.flipHorizontally); } /** @@ -221,7 +221,7 @@ public class GT_GuiTabLine { public void onMouseClicked(int mouseX, int mouseY, int mouseButton) { for (int tabId = 0; tabId < mTabs.length; tabId++) { if (mTabs[tabId] != null && mTabs[tabId].getBounds() - .contains(mouseX, mouseY)) { + .contains(mouseX, mouseY)) { tabClicked(tabId, mouseButton); return; } @@ -255,7 +255,7 @@ public class GT_GuiTabLine { */ private int getTabX(int tabId) { return this.gui.getGuiLeft() + (flipHorizontally ? (gui.getXSize() - tabLineLeft - tabWidth) : tabLineLeft) - + (tabId * (tabWidth + tabSpacing) * xDir.getValue()); + + (tabId * (tabWidth + tabSpacing) * xDir.getValue()); } /** diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java index 81566de014..4304ca14fc 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java @@ -50,8 +50,8 @@ public class GT_GuiTooltipManager { // Give the tooltip the opportunity to decide whether they should be enabled tip.onTick(); if (tip.enabled && (!tip.isDelayed() || mouseStopped > DELAY) - && tip.getBounds() - .contains(mouseX, mouseY)) { + && tip.getBounds() + .contains(mouseX, mouseY)) { tip.updateText(); drawTooltip(tip, mouseX, mouseY, render); break; @@ -67,7 +67,7 @@ public class GT_GuiTooltipManager { int maxWidth = 0; for (String s : text) { int w = render.getFontRenderer() - .getStringWidth(s); + .getStringWidth(s); if (w > maxWidth) { maxWidth = w; } |
