diff options
Diffstat (limited to 'src/main/java/gregtech/api/gui')
33 files changed, 793 insertions, 1075 deletions
diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java index 819171ae02..e2ef6fd658 100644 --- a/src/main/java/gregtech/api/gui/GT_Container.java +++ b/src/main/java/gregtech/api/gui/GT_Container.java @@ -140,9 +140,9 @@ public class GT_Container extends Container { } if (aMouseclick == 1) { aPlayer.dropPlayerItemWithRandomChoice( - aPlayerInventory.getItemStack() - .splitStack(1), - true); + aPlayerInventory.getItemStack() + .splitStack(1), + true); if (aPlayerInventory.getItemStack().stackSize == 0) { aPlayerInventory.setItemStack(null); } @@ -155,8 +155,7 @@ public class GT_Container extends Container { if (tTempStack != null) { rStack = GT_Utility.copyOrNull(tTempStack); if (aSlot.getStack() != null && aSlot.getStack() - .getItem() - == tTempStack.getItem()) { + .getItem() == tTempStack.getItem()) { slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } } @@ -195,8 +194,8 @@ public class GT_Container extends Container { aSlot.onPickupFromSlot(aPlayer, aPlayerInventory.getItemStack()); } else if (aSlot.isItemValid(mouseStack)) { if (tTempStack.getItem() == mouseStack.getItem() - && tTempStack.getItemDamage() == mouseStack.getItemDamage() - && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) { + && tTempStack.getItemDamage() == mouseStack.getItemDamage() + && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) { tTempStackSize = aMouseclick == 0 ? mouseStack.stackSize : 1; if (tTempStackSize > aSlot.getSlotStackLimit() - tTempStack.stackSize) { tTempStackSize = aSlot.getSlotStackLimit() - tTempStack.stackSize; @@ -214,23 +213,23 @@ public class GT_Container extends Container { aPlayerInventory.setItemStack(tTempStack); } } else if (tTempStack.getItem() == mouseStack.getItem() && mouseStack.getMaxStackSize() > 1 - && (!tTempStack.getHasSubtypes() - || tTempStack.getItemDamage() == mouseStack.getItemDamage()) - && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) { - tTempStackSize = tTempStack.stackSize; - - if (tTempStackSize > 0 - && tTempStackSize + mouseStack.stackSize <= mouseStack.getMaxStackSize()) { - mouseStack.stackSize += tTempStackSize; - tTempStack = aSlot.decrStackSize(tTempStackSize); - - if (tTempStack.stackSize == 0) { - aSlot.putStack(null); - } - - aSlot.onPickupFromSlot(aPlayer, aPlayerInventory.getItemStack()); + && (!tTempStack.getHasSubtypes() + || tTempStack.getItemDamage() == mouseStack.getItemDamage()) + && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) { + tTempStackSize = tTempStack.stackSize; + + if (tTempStackSize > 0 + && tTempStackSize + mouseStack.stackSize <= mouseStack.getMaxStackSize()) { + mouseStack.stackSize += tTempStackSize; + tTempStack = aSlot.decrStackSize(tTempStackSize); + + if (tTempStack.stackSize == 0) { + aSlot.putStack(null); } + + aSlot.onPickupFromSlot(aPlayer, aPlayerInventory.getItemStack()); } + } } aSlot.onSlotChanged(); } @@ -245,7 +244,7 @@ public class GT_Container extends Container { // get the stack at the specified hotbar slot. tTempStack = aPlayerInventory.getStackInSlot(aMouseclick); boolean canSwap = tTempStack == null - || aSlot.inventory == aPlayerInventory && aSlot.isItemValid(tTempStack); + || aSlot.inventory == aPlayerInventory && aSlot.isItemValid(tTempStack); tTempStackSize = -1; if (!canSwap) { @@ -275,15 +274,15 @@ public class GT_Container extends Container { } } } else if (aShifthold == 3 && aPlayer.capabilities.isCreativeMode - && aPlayerInventory.getItemStack() == null - && aSlotIndex >= 0) { - aSlot = this.inventorySlots.get(aSlotIndex); - if (aSlot != null && aSlot.getHasStack()) { - tTempStack = GT_Utility.copyOrNull(aSlot.getStack()); - tTempStack.stackSize = tTempStack.getMaxStackSize(); - aPlayerInventory.setItemStack(tTempStack); - } + && aPlayerInventory.getItemStack() == null + && aSlotIndex >= 0) { + aSlot = this.inventorySlots.get(aSlotIndex); + if (aSlot != null && aSlot.getHasStack()) { + tTempStack = GT_Utility.copyOrNull(aSlot.getStack()); + tTempStack.stackSize = tTempStack.getMaxStackSize(); + aPlayerInventory.setItemStack(tTempStack); } + } return rStack; } @@ -296,8 +295,8 @@ public class GT_Container extends Container { // null checks and checks if the item can be stacked (maxStackSize > 1) if (getSlotCount() > 0 && slotObject != null - && slotObject.getHasStack() - && !(slotObject instanceof GT_Slot_Holo)) { + && slotObject.getHasStack() + && !(slotObject instanceof GT_Slot_Holo)) { ItemStack stackInSlot = slotObject.getStack(); stack = GT_Utility.copyOrNull(stackInSlot); @@ -309,12 +308,12 @@ public class GT_Container extends Container { } // Player -> TileEntity } else if (!mergeItemStack( - stackInSlot, - getShiftClickStartIndex(), - getShiftClickStartIndex() + getShiftClickSlotCount(), - false)) { - return null; - } + stackInSlot, + getShiftClickStartIndex(), + getShiftClickStartIndex() + getShiftClickSlotCount(), + false)) { + return null; + } if (stackInSlot.stackSize == 0) { slotObject.putStack(null); @@ -344,15 +343,15 @@ public class GT_Container extends Container { if (aStack.isStackable()) { while (aStack.stackSize > 0 - && (!reverseOrder && slotIndex < aSlotCount || reverseOrder && slotIndex >= aStartIndex)) { + && (!reverseOrder && slotIndex < aSlotCount || reverseOrder && slotIndex >= aStartIndex)) { slot = this.inventorySlots.get(slotIndex); itemStack = slot.getStack(); if (!(slot instanceof GT_Slot_Holo) && !(slot instanceof GT_Slot_Output) - && slot.isItemValid(aStack) - && itemStack != null - && itemStack.getItem() == aStack.getItem() - && (!aStack.getHasSubtypes() || aStack.getItemDamage() == itemStack.getItemDamage()) - && ItemStack.areItemStackTagsEqual(aStack, itemStack)) { + && slot.isItemValid(aStack) + && itemStack != null + && itemStack.getItem() == aStack.getItem() + && (!aStack.getHasSubtypes() || aStack.getItemDamage() == itemStack.getItemDamage()) + && ItemStack.areItemStackTagsEqual(aStack, itemStack)) { int combinedStackSize = itemStack.stackSize + aStack.stackSize; if (itemStack.stackSize < mTileEntity.getInventoryStackLimit()) { if (combinedStackSize <= aStack.getMaxStackSize()) { @@ -598,7 +597,7 @@ public class GT_Container extends Container { } protected static ItemStack handleFluidSlotClick(IFluidAccess aFluidAccess, EntityPlayer aPlayer, - boolean aProcessFullStack, boolean aCanDrain, boolean aCanFill) { + boolean aProcessFullStack, boolean aCanDrain, boolean aCanFill) { ItemStack tStackHeld = aPlayer.inventory.getItemStack(); ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld); if (tStackSizedOne == null || tStackHeld.stackSize == 0) return null; @@ -669,11 +668,10 @@ public class GT_Container extends Container { } protected static ItemStack fillFluid(IFluidAccess aFluidAccess, EntityPlayer aPlayer, FluidStack aFluidHeld, - boolean aProcessFullStack) { + boolean aProcessFullStack) { // we are not using aMachine.fill() here any more, so we need to check for fluid type here ourselves if (aFluidAccess.get() != null && !aFluidAccess.get() - .isFluidEqual(aFluidHeld)) - return null; + .isFluidEqual(aFluidHeld)) return null; ItemStack tStackHeld = aPlayer.inventory.getItemStack(); ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld); if (tStackSizedOne == null) return null; diff --git a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java index 3f2b45064d..af1393cbfb 100644 --- a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java +++ b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java @@ -22,10 +22,10 @@ import gregtech.api.util.GT_Utility; public class GT_ContainerMetaTile_Machine extends GT_Container { public int mActive = 0, mMaxProgressTime = 0, mProgressTime = 0, mEnergy = 0, mSteam = 0, mSteamStorage = 0, - mStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0; + mStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0; public long mEnergyLong = 0, mStorageLong = 0; private int oActive = 0, oMaxProgressTime = 0, oProgressTime = 0, oEnergy = 0, oSteam = 0, oSteamStorage = 0, - oStorage = 0, oOutput = 0, oInput = 0, oID = 0, oDisplayErrorCode = 0; + oStorage = 0, oOutput = 0, oInput = 0, oID = 0, oDisplayErrorCode = 0; private long oEnergyLong = 0, oStorageLong = 0; protected int mTimer = 0; protected Runnable circuitSlotClickCallback; @@ -45,7 +45,7 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { } public GT_ContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, - boolean doesBindInventory) { + boolean doesBindInventory) { super(aInventoryPlayer, aTileEntity); mTileEntity = aTileEntity; @@ -61,10 +61,10 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { protected void addCircuitSlot() { if (mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport ccs) { GT_Slot_Render slotCircuit = new GT_Slot_Render( - mTileEntity, - ccs.getCircuitSlot(), - ccs.getCircuitSlotX(), - ccs.getCircuitSlotY()); + mTileEntity, + ccs.getCircuitSlot(), + ccs.getCircuitSlotX(), + ccs.getCircuitSlotY()); addSlotToContainer(slotCircuit); slotCircuit.setEnabled(ccs.allowSelectCircuit()); } @@ -222,9 +222,8 @@ public class GT_ContainerMetaTile_Machine extends GT_Container { List<ItemStack> tCircuits = ccs.getConfigurationCircuits(); int index = GT_Utility.findMatchingStackInList(tCircuits, cursorStack); if (index < 0) { - int curIndex = GT_Utility.findMatchingStackInList( - tCircuits, - machine.getStackInSlot(ccs.getCircuitSlot())) + 1; + int curIndex = GT_Utility + .findMatchingStackInList(tCircuits, machine.getStackInSlot(ccs.getCircuitSlot())) + 1; if (aMouseclick == 0) { curIndex += 1; } else { diff --git a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java index 976d7e8127..479c021d89 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java +++ b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java @@ -217,7 +217,7 @@ public class GT_Container_BasicMachine extends GT_Container_BasicTank { } default -> { if (aSlotNumber == OTHER_SLOT_COUNT + 1 + machine.mInputSlotCount + machine.mOutputItems.length - && aMouseclick < 2) { + && aMouseclick < 2) { GT_MetaTileEntity_BasicTank tTank = (GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity(); if (mTileEntity.isClientSide()) { // see parent class slotClick for an explanation on why doing this @@ -228,11 +228,11 @@ public class GT_Container_BasicMachine extends GT_Container_BasicTank { GT_Recipe_Map recipes = machine.getRecipeList(); // If the machine has recipes but no fluid inputs, disallow filling this slot with fluids. ItemStack tToken = handleFluidSlotClick( - tFillableAccess, - aPlayer, - aMouseclick == 0, - true, - (recipes == null || recipes.hasFluidInputs())); + tFillableAccess, + aPlayer, + aMouseclick == 0, + true, + (recipes == null || recipes.hasFluidInputs())); if (mTileEntity.isServerSide() && tToken != null) mTileEntity.markInventoryBeenModified(); return tToken; } else { diff --git a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java b/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java index f463b35f7c..08e8e6eb00 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java +++ b/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java @@ -56,11 +56,11 @@ public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine { } IFluidAccess tDrainableAccess = constructFluidAccess(tTank, false); return handleFluidSlotClick( - tDrainableAccess, - aPlayer, - aMouseclick == 0, - true, - !tTank.isDrainableStackSeparate()); + tDrainableAccess, + aPlayer, + aMouseclick == 0, + true, + !tTank.isDrainableStackSeparate()); } return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } diff --git a/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java index bcc9219d5e..142b84e008 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java +++ b/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java @@ -18,7 +18,7 @@ public class GT_Container_MultiMachine extends GT_ContainerMetaTile_Machine { } public GT_Container_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, - boolean bindInventory) { + boolean bindInventory) { super(aInventoryPlayer, aTileEntity, bindInventory); } diff --git a/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java index 7c6328bb34..85e56d9b52 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java +++ b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java @@ -22,27 +22,22 @@ public class GT_GUIColorOverride { private static final Object NOT_FOUND = new Object(); private static final LoadingCache<ResourceLocation, Object> cache = CacheBuilder.newBuilder() - .softValues() - .build(new CacheLoader<>() { - - @Override - public Object load( - @Nonnull ResourceLocation key) - throws Exception { - IResource ir = Minecraft.getMinecraft() - .getResourceManager() - .getResource( - key); - if (ir.hasMetadata()) - return ir.getMetadata( - "colors"); - // return a dummy - // object because - // LoadingCache - // doesn't like null - return NOT_FOUND; - } - }); + .softValues() + .build(new CacheLoader<>() { + + @Override + public Object load(@Nonnull ResourceLocation key) throws Exception { + IResource ir = Minecraft.getMinecraft() + .getResourceManager() + .getResource(key); + if (ir.hasMetadata()) return ir.getMetadata("colors"); + // return a dummy + // object because + // LoadingCache + // doesn't like null + return NOT_FOUND; + } + }); private static final GT_GUIColorOverride FALLBACK = new GT_GUIColorOverride(); private ColorsMetadataSection cmSection; diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java index cbccdc5385..a72e9737ee 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java @@ -47,20 +47,20 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements // Cover Tabs support. Subclasses can override display position, style and visuals by overriding setupCoverTabs public GT_GuiCoverTabLine coverTabs; private static final int COVER_TAB_LEFT = -16, COVER_TAB_TOP = 1, COVER_TAB_HEIGHT = 20, COVER_TAB_WIDTH = 18, - COVER_TAB_SPACING = 2; + COVER_TAB_SPACING = 2; private static final DisplayStyle COVER_TAB_X_DIR = DisplayStyle.NONE, COVER_TAB_Y_DIR = DisplayStyle.NORMAL; private static final GT_GuiTabIconSet TAB_ICONSET = new GT_GuiTabIconSet( - GT_GuiIcon.TAB_NORMAL, - GT_GuiIcon.TAB_HIGHLIGHT, - GT_GuiIcon.TAB_DISABLED); + GT_GuiIcon.TAB_NORMAL, + GT_GuiIcon.TAB_HIGHLIGHT, + GT_GuiIcon.TAB_DISABLED); public GT_GUIContainerMetaTile_Machine(GT_ContainerMetaTile_Machine aContainer, String aGUIbackground) { super(aContainer, aGUIbackground); mContainer = aContainer; DisplayStyle preferredDisplayStyle = GT_Mod.gregtechproxy.mCoverTabsVisible - ? (GT_Mod.gregtechproxy.mCoverTabsFlipped ? DisplayStyle.INVERSE : DisplayStyle.NORMAL) - : DisplayStyle.NONE; + ? (GT_Mod.gregtechproxy.mCoverTabsFlipped ? DisplayStyle.INVERSE : DisplayStyle.NORMAL) + : DisplayStyle.NONE; setupCoverTabs(preferredDisplayStyle); // Only setup tooltips if they're currently enabled. @@ -73,7 +73,7 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements } public GT_GUIContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, - String aGUIbackground) { + String aGUIbackground) { this(new GT_ContainerMetaTile_Machine(aInventoryPlayer, aTileEntity), aGUIbackground); } @@ -82,18 +82,18 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements */ protected void setupCoverTabs(DisplayStyle preferredDisplayStyle) { coverTabs = new GT_GuiCoverTabLine( - this, - COVER_TAB_LEFT, - COVER_TAB_TOP, - COVER_TAB_HEIGHT, - COVER_TAB_WIDTH, - COVER_TAB_SPACING, - COVER_TAB_X_DIR, - COVER_TAB_Y_DIR, - preferredDisplayStyle, - getTabBackground(), - getMachine().getBaseMetaTileEntity(), - getColorization()); + this, + COVER_TAB_LEFT, + COVER_TAB_TOP, + COVER_TAB_HEIGHT, + COVER_TAB_WIDTH, + COVER_TAB_SPACING, + COVER_TAB_X_DIR, + COVER_TAB_Y_DIR, + preferredDisplayStyle, + getTabBackground(), + getMachine().getBaseMetaTileEntity(), + getColorization()); } @Override @@ -182,9 +182,9 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements protected void setupTooltips() { if (mContainer.mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport ccs) { if (ccs.allowSelectCircuit()) addToolTip( - new GT_GuiSlotTooltip( - mContainer.getSlot(ccs.getCircuitGUISlot()), - mTooltipCache.getData(GHOST_CIRCUIT_TOOLTIP))); + new GT_GuiSlotTooltip( + mContainer.getSlot(ccs.getCircuitGUISlot()), + mTooltipCache.getData(GHOST_CIRCUIT_TOOLTIP))); } } @@ -234,7 +234,7 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements if (mContainer.mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport ccs) { Slot slotCircuit = mContainer.getSlot(ccs.getCircuitGUISlot()); if (slotCircuit != null - && func_146978_c(slotCircuit.xDisplayPosition, slotCircuit.yDisplayPosition, 16, 16, mx, my)) { + && func_146978_c(slotCircuit.xDisplayPosition, slotCircuit.yDisplayPosition, 16, 16, mx, my)) { // emulate click handleMouseClick(slotCircuit, -1, delta > 0 ? 1 : 0, 0); return; @@ -248,13 +248,13 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport) machine; List<ItemStack> circuits = ccs.getConfigurationCircuits(); mc.displayGuiScreen( - new GT_GUIDialogSelectItem( - StatCollector.translateToLocal("GT5U.machines.select_circuit"), - machine.getStackForm(0), - this, - this::onCircuitSelected, - circuits, - GT_Utility.findMatchingStackInList(circuits, machine.getStackInSlot(ccs.getCircuitSlot())))); + new GT_GUIDialogSelectItem( + StatCollector.translateToLocal("GT5U.machines.select_circuit"), + machine.getStackForm(0), + this, + this::onCircuitSelected, + circuits, + GT_Utility.findMatchingStackInList(circuits, machine.getStackInSlot(ccs.getCircuitSlot())))); } private void onCircuitSelected(ItemStack selected) { diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java index 1d82fa8274..5bd44668c5 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java @@ -14,16 +14,16 @@ public class GT_GUIContainer_1by1 extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_1by1(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { super( - new GT_Container_1by1(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath("textures", "gui", "1by1.png")); + new GT_Container_1by1(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath("textures", "gui", "1by1.png")); mName = aName; } public GT_GUIContainer_1by1(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aBackground) { + String aBackground) { super( - new GT_Container_1by1(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath("textures", "gui", aBackground + "1by1.png")); + new GT_Container_1by1(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath("textures", "gui", aBackground + "1by1.png")); mName = aName; } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java index 5d65ca1344..107bcc3859 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java @@ -14,16 +14,16 @@ public class GT_GUIContainer_2by2 extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { super( - new GT_Container_2by2(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath("textures", "gui", "2by2.png")); + new GT_Container_2by2(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath("textures", "gui", "2by2.png")); mName = aName; } public GT_GUIContainer_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aBackground) { + String aBackground) { super( - new GT_Container_2by2(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath("textures", "gui", aBackground + "2by2.png")); + new GT_Container_2by2(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath("textures", "gui", aBackground + "2by2.png")); mName = aName; } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java index 2ba68decf6..0c8b63664a 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java @@ -14,16 +14,16 @@ public class GT_GUIContainer_3by3 extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_3by3(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { super( - new GT_Container_3by3(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath("textures", "gui", "3by3.png")); + new GT_Container_3by3(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath("textures", "gui", "3by3.png")); mName = aName; } public GT_GUIContainer_3by3(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aBackground) { + String aBackground) { super( - new GT_Container_3by3(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath("textures", "gui", aBackground + "3by3.png")); + new GT_Container_3by3(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath("textures", "gui", aBackground + "3by3.png")); mName = aName; } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java index f1933897c7..9e5d7f7155 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java @@ -14,16 +14,16 @@ public class GT_GUIContainer_4by4 extends GT_GUIContainerMetaTile_Machine { public GT_GUIContainer_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { super( - new GT_Container_4by4(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath("textures", "gui", "4by4.png")); + new GT_Container_4by4(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath("textures", "gui", "4by4.png")); mName = aName; } public GT_GUIContainer_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aBackground) { + String aBackground) { super( - new GT_Container_4by4(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath("textures", "gui", aBackground + "4by4.png")); + new GT_Container_4by4(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath("textures", "gui", aBackground + "4by4.png")); mName = aName; } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java index 6e6ce4c1d0..f610f6cf14 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java @@ -28,40 +28,39 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin private static final int NEEDS_STEAM_VENTING = 64; private static final GT_GuiTabIconSet TAB_ICONSET_BRONZE = new GT_GuiTabIconSet( - GT_GuiIcon.TAB_NORMAL_BRONZE, - GT_GuiIcon.TAB_HIGHLIGHT_BRONZE, - GT_GuiIcon.TAB_DISABLED_BRONZE); + GT_GuiIcon.TAB_NORMAL_BRONZE, + GT_GuiIcon.TAB_HIGHLIGHT_BRONZE, + GT_GuiIcon.TAB_DISABLED_BRONZE); private static final GT_GuiTabIconSet TAB_ICONSET_STEEL = new GT_GuiTabIconSet( - GT_GuiIcon.TAB_NORMAL_STEEL, - GT_GuiIcon.TAB_HIGHLIGHT_STEEL, - GT_GuiIcon.TAB_DISABLED_STEEL); + GT_GuiIcon.TAB_NORMAL_STEEL, + GT_GuiIcon.TAB_HIGHLIGHT_STEEL, + GT_GuiIcon.TAB_DISABLED_STEEL); private final int textColor = this.getTextColorOrDefault("title", 0x404040); public final String mName, mNEI; public final byte mProgressBarDirection, mProgressBarAmount; // Tooltip localization keys private static final String BATTERY_SLOT_TOOLTIP = "GT5U.machines.battery_slot.tooltip", - BATTERY_SLOT_TOOLTIP_ALT = "GT5U.machines.battery_slot.tooltip.alternative", - UNUSED_SLOT_TOOLTIP = "GT5U.machines.unused_slot.tooltip", - SPECIAL_SLOT_TOOLTIP = "GT5U.machines.special_slot.tooltip", - FLUID_INPUT_TOOLTIP = "GT5U.machines.fluid_input_slot.tooltip", - FLUID_OUTPUT_TOOLTIP = "GT5U.machines.fluid_output_slot.tooltip", - STALLED_STUTTERING_TOOLTIP = "GT5U.machines.stalled_stuttering.tooltip", - STALLED_VENT_TOOLTIP = "GT5U.machines.stalled_vent.tooltip", - FLUID_TRANSFER_TOOLTIP = "GT5U.machines.fluid_transfer.tooltip", - ITEM_TRANSFER_TOOLTIP = "GT5U.machines.item_transfer.tooltip", - POWER_SOURCE_KEY = "GT5U.machines.powersource."; + BATTERY_SLOT_TOOLTIP_ALT = "GT5U.machines.battery_slot.tooltip.alternative", + UNUSED_SLOT_TOOLTIP = "GT5U.machines.unused_slot.tooltip", + SPECIAL_SLOT_TOOLTIP = "GT5U.machines.special_slot.tooltip", + FLUID_INPUT_TOOLTIP = "GT5U.machines.fluid_input_slot.tooltip", + FLUID_OUTPUT_TOOLTIP = "GT5U.machines.fluid_output_slot.tooltip", + STALLED_STUTTERING_TOOLTIP = "GT5U.machines.stalled_stuttering.tooltip", + STALLED_VENT_TOOLTIP = "GT5U.machines.stalled_vent.tooltip", + FLUID_TRANSFER_TOOLTIP = "GT5U.machines.fluid_transfer.tooltip", + ITEM_TRANSFER_TOOLTIP = "GT5U.machines.item_transfer.tooltip", POWER_SOURCE_KEY = "GT5U.machines.powersource."; public GT_GUIContainer_BasicMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aTextureFile, String aNEI) { + String aTextureFile, String aNEI) { this(aInventoryPlayer, aTileEntity, aName, aTextureFile, aNEI, (byte) 0, (byte) 1); } public GT_GUIContainer_BasicMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aTextureFile, String aNEI, byte aProgressBarDirection, byte aProgressBarAmount) { + String aTextureFile, String aNEI, byte aProgressBarDirection, byte aProgressBarAmount) { super( - new GT_Container_BasicMachine(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath("textures", "gui", "basicmachines", aTextureFile)); + new GT_Container_BasicMachine(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath("textures", "gui", "basicmachines", aTextureFile)); mProgressBarDirection = aProgressBarDirection; mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount); mName = aName; @@ -84,10 +83,10 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin batterySlotTooltipKey = UNUSED_SLOT_TOOLTIP; batterySlotTooltipArgs = new String[0]; addToolTip( - new GT_GuiSmartTooltip( - tProblemArea, - () -> hasErrorCode(NEEDS_STEAM_VENTING), - mTooltipCache.getData(STALLED_VENT_TOOLTIP))); + new GT_GuiSmartTooltip( + tProblemArea, + () -> hasErrorCode(NEEDS_STEAM_VENTING), + mTooltipCache.getData(STALLED_VENT_TOOLTIP))); } else { String pTier1 = powerTierName(machine.mTier); if (machine.mTier == GT_Values.VN.length - 1) { @@ -98,44 +97,41 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin batterySlotTooltipArgs = new String[] { pTier1, powerTierName((byte) (machine.mTier + 1)) }; } addToolTip( - new GT_GuiSlotTooltip( - container.slotFluidTransferToggle, - mTooltipCache.getData(FLUID_TRANSFER_TOOLTIP))); + new GT_GuiSlotTooltip( + container.slotFluidTransferToggle, + mTooltipCache.getData(FLUID_TRANSFER_TOOLTIP))); addToolTip( - new GT_GuiSlotTooltip( - container.slotItemTransferToggle, - mTooltipCache.getData(ITEM_TRANSFER_TOOLTIP))); + new GT_GuiSlotTooltip(container.slotItemTransferToggle, mTooltipCache.getData(ITEM_TRANSFER_TOOLTIP))); } if (recipes != null && recipes.hasFluidInputs()) { addToolTip( - new GT_GuiSlotTooltip( - container.slotFluidInput, - mTooltipCache.getData(FLUID_INPUT_TOOLTIP, machine.getCapacity()))); + new GT_GuiSlotTooltip( + container.slotFluidInput, + mTooltipCache.getData(FLUID_INPUT_TOOLTIP, machine.getCapacity()))); } if (recipes != null && recipes.hasFluidOutputs()) { addToolTip( - new GT_GuiSlotTooltip( - container.slotFluidOutput, - mTooltipCache.getData(FLUID_OUTPUT_TOOLTIP, machine.getCapacity()))); + new GT_GuiSlotTooltip( + container.slotFluidOutput, + mTooltipCache.getData(FLUID_OUTPUT_TOOLTIP, machine.getCapacity()))); } addToolTip( - new GT_GuiSlotTooltip( - getContainer().slotBattery, - mTooltipCache.getData(batterySlotTooltipKey, batterySlotTooltipArgs))); + new GT_GuiSlotTooltip( + getContainer().slotBattery, + mTooltipCache.getData(batterySlotTooltipKey, batterySlotTooltipArgs))); addToolTip( - new GT_GuiSlotTooltip( - container.slotSpecial, - mTooltipCache.getData( - recipes != null && recipes.usesSpecialSlot() ? SPECIAL_SLOT_TOOLTIP - : UNUSED_SLOT_TOOLTIP))); + new GT_GuiSlotTooltip( + container.slotSpecial, + mTooltipCache.getData( + recipes != null && recipes.usesSpecialSlot() ? SPECIAL_SLOT_TOOLTIP : UNUSED_SLOT_TOOLTIP))); addToolTip( - new GT_GuiSmartTooltip( - tProblemArea, - () -> container.mStuttering && !hasErrorCode(NEEDS_STEAM_VENTING), - mTooltipCache.getData( - STALLED_STUTTERING_TOOLTIP, - StatCollector.translateToLocal( - POWER_SOURCE_KEY + (machine.isSteampowered() ? "steam" : "power"))))); + new GT_GuiSmartTooltip( + tProblemArea, + () -> container.mStuttering && !hasErrorCode(NEEDS_STEAM_VENTING), + mTooltipCache.getData( + STALLED_STUTTERING_TOOLTIP, + StatCollector + .translateToLocal(POWER_SOURCE_KEY + (machine.isSteampowered() ? "steam" : "power"))))); } /** @@ -174,31 +170,30 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin if (mContainer.mMaxProgressTime > 0) { int tSize = mProgressBarDirection < 2 ? 20 : 18; int tProgress = Math.max( - 1, - Math.min( - tSize * mProgressBarAmount, - (mContainer.mProgressTime > 0 ? 1 : 0) + mContainer.mProgressTime * tSize - * mProgressBarAmount - / mContainer.mMaxProgressTime)) - % (tSize + 1); + 1, + Math.min( + tSize * mProgressBarAmount, + (mContainer.mProgressTime > 0 ? 1 : 0) + + mContainer.mProgressTime * tSize * mProgressBarAmount / mContainer.mMaxProgressTime)) + % (tSize + 1); switch (mProgressBarDirection) { // yes, my OCD was mad at me before I did the Tabs. case 0 -> drawTexturedModalRect(x + 78, y + 24, 176, 0, tProgress, 18); case 1 -> drawTexturedModalRect( - x + 78 + 20 - tProgress, - y + 24, - 176 + 20 - tProgress, - 0, - tProgress, - 18); + x + 78 + 20 - tProgress, + y + 24, + 176 + 20 - tProgress, + 0, + tProgress, + 18); case 2 -> drawTexturedModalRect(x + 78, y + 24, 176, 0, 20, tProgress); case 3 -> drawTexturedModalRect( - x + 78, - y + 24 + 18 - tProgress, - 176, - 18 - tProgress, - 20, - tProgress); + x + 78, + y + 24 + 18 - tProgress, + 176, + 18 - tProgress, + 20, + tProgress); case 4 -> { tProgress = 20 - tProgress; drawTexturedModalRect(x + 78, y + 24, 176, 0, tProgress, 18); @@ -224,7 +219,7 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin protected GT_GuiTabIconSet getTabBackground() { if (getMachine().isSteampowered()) { return getMachine() instanceof GT_MetaTileEntity_BasicMachine_Steel ? TAB_ICONSET_STEEL - : TAB_ICONSET_BRONZE; + : TAB_ICONSET_BRONZE; } return super.getTabBackground(); } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java index a8e965cf28..54aa42d2a3 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java @@ -12,31 +12,28 @@ public class GT_GUIContainer_BasicTank extends GT_GUIContainerMetaTile_Machine { private final String mName; private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF), - textColorTitle = this.getTextColorOrDefault("title", 0x404040), - textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF); + textColorTitle = this.getTextColorOrDefault("title", 0x404040), + textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF); public GT_GUIContainer_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { super( - new GT_Container_BasicTank(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath("textures", "gui", "BasicTank.png")); + new GT_Container_BasicTank(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath("textures", "gui", "BasicTank.png")); mName = aName; } @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - fontRendererObj.drawString( - StatCollector.translateToLocal("container.inventory"), - 8, - ySize - 96 + 2, - textColorTitle); + fontRendererObj + .drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorTitle); fontRendererObj.drawString(mName, 8, 6, textColorTitle); if (mContainer != null) { fontRendererObj.drawString("Liquid Amount", 10, 20, textColor); fontRendererObj.drawString( - GT_Utility.parseNumberToString(((GT_Container_BasicTank) mContainer).mContent), - 10, - 30, - textColorValue); + GT_Utility.parseNumberToString(((GT_Container_BasicTank) mContainer).mContent), + 10, + 30, + textColorValue); } } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java index 8378c5e8cf..66c5156190 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java @@ -22,17 +22,17 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin String mName; private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF), - textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF); + textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF); public GT_GUIContainer_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aTextureFile) { + String aTextureFile) { super( - new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), - GregTech.getResourcePath( - "textures", - "gui", - "multimachines", - aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), + GregTech.getResourcePath( + "textures", + "gui", + "multimachines", + aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); mName = aName; } @@ -69,7 +69,7 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin current_line.append(str); } else { current_line.append(" ") - .append(str); + .append(str); } index++; } @@ -98,90 +98,60 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin } if ((mContainer.mDisplayErrorCode & 8) != 0) { - fontRendererObj.drawString( - GT_Utility.trans("135", "Platings are dented."), - 10, - line_counter, - textColor); + fontRendererObj + .drawString(GT_Utility.trans("135", "Platings are dented."), 10, line_counter, textColor); line_counter += 8; } if ((mContainer.mDisplayErrorCode & 16) != 0) { - fontRendererObj.drawString( - GT_Utility.trans("136", "Circuitry burned out."), - 10, - line_counter, - textColor); + fontRendererObj + .drawString(GT_Utility.trans("136", "Circuitry burned out."), 10, line_counter, textColor); line_counter += 8; } if ((mContainer.mDisplayErrorCode & 32) != 0) { - fontRendererObj.drawString( - GT_Utility.trans("137", "That doesn't belong there."), - 10, - line_counter, - textColor); + fontRendererObj + .drawString(GT_Utility.trans("137", "That doesn't belong there."), 10, line_counter, textColor); line_counter += 8; } if ((mContainer.mDisplayErrorCode & 64) != 0) { - fontRendererObj.drawString( - GT_Utility.trans("138", "Incomplete Structure."), - 10, - line_counter, - textColor); + fontRendererObj + .drawString(GT_Utility.trans("138", "Incomplete Structure."), 10, line_counter, textColor); line_counter += 8; } if (mContainer.mDisplayErrorCode == 0) { if (mContainer.mActive == 0) { - fontRendererObj.drawString( - GT_Utility.trans("139", "Hit with Soft Mallet"), - 10, - line_counter, - textColor); + fontRendererObj + .drawString(GT_Utility.trans("139", "Hit with Soft Mallet"), 10, line_counter, textColor); line_counter += 8; - fontRendererObj.drawString( - GT_Utility.trans("140", "to (re-)start the Machine"), - 10, - line_counter, - textColor); + fontRendererObj + .drawString(GT_Utility.trans("140", "to (re-)start the Machine"), 10, line_counter, textColor); line_counter += 8; - fontRendererObj.drawString( - GT_Utility.trans("141", "if it doesn't start."), - 10, - line_counter, - textColor); + fontRendererObj + .drawString(GT_Utility.trans("141", "if it doesn't start."), 10, line_counter, textColor); } else { - fontRendererObj.drawString( - GT_Utility.trans("142", "Running perfectly."), - 10, - line_counter, - textColor); + fontRendererObj + .drawString(GT_Utility.trans("142", "Running perfectly."), 10, line_counter, textColor); } line_counter += 8; if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_DrillerBase) { ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity() - .getStackInSlot(1); + .getStackInSlot(1); if (tItem == null - || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) { - fontRendererObj.drawString( - GT_Utility.trans("143", "Missing Mining Pipe"), - 10, - line_counter, - textColor); + || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) { + fontRendererObj + .drawString(GT_Utility.trans("143", "Missing Mining Pipe"), 10, line_counter, textColor); } } else if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine) { ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity() - .getStackInSlot(1); + .getStackInSlot(1); if (tItem == null - || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 - && tItem.getItemDamage() <= 177)) { - fontRendererObj.drawString( - GT_Utility.trans("144", "Missing Turbine Rotor"), - 10, - line_counter, - textColor); + || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 + && tItem.getItemDamage() <= 177)) { + fontRendererObj + .drawString(GT_Utility.trans("144", "Missing Turbine Rotor"), 10, line_counter, textColor); } } } diff --git a/src/main/java/gregtech/api/gui/GT_GUICover.java b/src/main/java/gregtech/api/gui/GT_GUICover.java index 2bd981c6b1..791bcc0c73 100644 --- a/src/main/java/gregtech/api/gui/GT_GUICover.java +++ b/src/main/java/gregtech/api/gui/GT_GUICover.java @@ -40,13 +40,13 @@ public abstract class GT_GUICover extends GT_GUIScreen { // If this cover was given a guiId, tell the server to open it for us when this GUI closes. if (parentGuiId != -1 && tile.isUseableByPlayer(mc.thePlayer)) { GT_Values.NW.sendToServer( - new GT_Packet_GtTileEntityGuiRequest( - tile.getXCoord(), - tile.getYCoord(), - tile.getZCoord(), - parentGuiId, - tile.getWorld().provider.dimensionId, - mc.thePlayer.getEntityId())); + new GT_Packet_GtTileEntityGuiRequest( + tile.getXCoord(), + tile.getYCoord(), + tile.getZCoord(), + parentGuiId, + tile.getWorld().provider.dimensionId, + mc.thePlayer.getEntityId())); } else { this.mc.displayGuiScreen(null); this.mc.setIngameFocus(); diff --git a/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java b/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java index 1f95def197..03a6fb2a70 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java +++ b/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java @@ -28,11 +28,8 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { // all slots not including btnCurrent private final List<GT_GuiFakeItemButton> slots = new ArrayList<>(); // the currently selected slot content - private final GT_GuiFakeItemButton btnCurrent = new GT_GuiFakeItemButton( - this, - 8, - 25, - GT_GuiIcon.SLOT_DARKGRAY).setMimicSlot(true); + private final GT_GuiFakeItemButton btnCurrent = new GT_GuiFakeItemButton(this, 8, 25, GT_GuiIcon.SLOT_DARKGRAY) + .setMimicSlot(true); private final boolean noDeselect; private int selected; private int scroll = 0; @@ -40,12 +37,12 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { private GT_GuiIconButton btnDown; public GT_GUIDialogSelectItem(String header, ItemStack headerItem, GuiScreen parent, - Consumer<ItemStack> selectedCallback, List<ItemStack> stacks) { + Consumer<ItemStack> selectedCallback, List<ItemStack> stacks) { this(header, headerItem, parent, selectedCallback, stacks, UNSELECTED); } public GT_GUIDialogSelectItem(String header, ItemStack headerItem, GuiScreen parent, - Consumer<ItemStack> selectedCallback, List<ItemStack> stacks, int selected) { + Consumer<ItemStack> selectedCallback, List<ItemStack> stacks, int selected) { this(header, headerItem, parent, selectedCallback, stacks, selected, false); } @@ -64,7 +61,7 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { * is guaranteed to be called with a nonnull stack */ public GT_GUIDialogSelectItem(String header, ItemStack headerItem, GuiScreen parent, - Consumer<ItemStack> selectedCallback, List<ItemStack> stacks, int selected, boolean noDeselect) { + Consumer<ItemStack> selectedCallback, List<ItemStack> stacks, int selected, boolean noDeselect) { super(176, 107, header); this.noDeselect = noDeselect; if (headerItem != null) this.headerIcon.setItem(headerItem); @@ -80,8 +77,7 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { slots.add( - new GT_GuiFakeItemButton(this, 8 + 18 * j, 44 + 18 * i, GT_GuiIcon.SLOT_GRAY).setMimicSlot( - true)); + new GT_GuiFakeItemButton(this, 8 + 18 * j, 44 + 18 * i, GT_GuiIcon.SLOT_GRAY).setMimicSlot(true)); } } @@ -91,8 +87,8 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { @Override protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { - btnCurrent.setX( - 8 + 2 + fontRendererObj.getStringWidth(StatCollector.translateToLocal("GT5U.gui.select.current"))); + btnCurrent + .setX(8 + 2 + fontRendererObj.getStringWidth(StatCollector.translateToLocal("GT5U.gui.select.current"))); } @Override @@ -129,7 +125,7 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { int mx = x - guiLeft, my = y - guiTop; if (button == 0) { if (btnCurrent.getBounds() - .contains(mx, my)) { + .contains(mx, my)) { ensureSelectedDisplayed(); return; } @@ -137,20 +133,20 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { for (int i = 0, slotsSize = slots.size(); i < slotsSize; i++) { GT_GuiFakeItemButton slot = slots.get(i); if (slot.getBounds() - .contains(mx, my)) { + .contains(mx, my)) { setSelected(slotIndexToListIndex(i)); return; } } } else if (button == 1 && getSelected() >= 0) { if (btnCurrent.getBounds() - .contains(mx, my)) { + .contains(mx, my)) { setSelected(UNSELECTED); return; } GT_GuiFakeItemButton slot = getSlot(listIndexToSlotIndex(getSelected())); if (slot != null && slot.getBounds() - .contains(mx, my)) { + .contains(mx, my)) { setSelected(UNSELECTED); } } @@ -166,8 +162,8 @@ public class GT_GUIDialogSelectItem extends GT_GUIScreen { private void fillSlots() { for (int i = 0, j = scroll * cols; i < slots.size(); i++, j++) { slots.get(i) - .setItem(getCandidate(j)) - .setBgIcon(j == getSelected() ? GT_GuiIcon.SLOT_DARKGRAY : GT_GuiIcon.SLOT_GRAY); + .setItem(getCandidate(j)) + .setBgIcon(j == getSelected() ? GT_GuiIcon.SLOT_DARKGRAY : GT_GuiIcon.SLOT_GRAY); } } diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Armor.java b/src/main/java/gregtech/api/gui/GT_Slot_Armor.java index 9b4b81a31d..1c48b01430 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_Armor.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_Armor.java @@ -24,7 +24,7 @@ public class GT_Slot_Armor extends Slot { @Override public boolean isItemValid(ItemStack aStack) { return aStack != null && aStack.getItem() != null - && aStack.getItem() - .isValidArmor(aStack, mArmorType, mPlayer); + && aStack.getItem() + .isValidArmor(aStack, mArmorType, mPlayer); } } diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Holo.java b/src/main/java/gregtech/api/gui/GT_Slot_Holo.java index a01b91cefb..47bd5ceef3 100644 --- a/src/main/java/gregtech/api/gui/GT_Slot_Holo.java +++ b/src/main/java/gregtech/api/gui/GT_Slot_Holo.java @@ -16,7 +16,7 @@ public class GT_Slot_Holo extends Slot { public int mMaxStacksize = 127; public GT_Slot_Holo(IInventory inventory, int slotIndex, int xPos, int yPos, boolean aCanInsertItem, - boolean aCanStackItem, int aMaxStacksize) { + boolean aCanStackItem, int aMaxStacksize) { super(inventory, slotIndex, xPos, yPos); mCanInsertItem = aCanInsertItem; mCanStackItem = aCanStackItem; diff --git a/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java b/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java index 43b7210758..83a9d0f725 100644 --- a/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java +++ b/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java @@ -56,8 +56,8 @@ public class FallbackableSteamTexture { } else { try { Minecraft.getMinecraft() - .getResourceManager() - .getResource(candidate.get(steamVariant).location); + .getResourceManager() + .getResource(candidate.get(steamVariant).location); useFallback = false; } catch (IOException e) { useFallback = true; diff --git a/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java b/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java index 65a61ad951..62a933cfa6 100644 --- a/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java +++ b/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java @@ -23,7 +23,7 @@ public class GT_CoverUIBuildContext extends UIBuildContext { * @param guiColorization The color used to render machine's GUI */ public GT_CoverUIBuildContext(EntityPlayer player, int coverID, byte side, ICoverable tile, boolean anotherWindow, - int guiColorization) { + int guiColorization) { super(player); this.coverID = coverID; this.side = side; diff --git a/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java b/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java index 4d004429b0..b132f33d63 100644 --- a/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java +++ b/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java @@ -36,46 +36,31 @@ public class GT_UIInfos { * Do NOT run {@link UIBuilder#build} on-the-fly, otherwise MP client won't register UIs. Instead, store to static * field, just like {@link #GTTileEntityDefaultUI}. Such mistake can be easily overlooked by testing only SP. */ - public static final Function<ContainerConstructor, UIInfo<?, ?>> GTTileEntityUIFactory = containerConstructor -> UIBuilder.of() - .container( - (player, world, - x, - y, - z) -> { - TileEntity te = world.getTileEntity( - x, - y, - z); - if (te instanceof ITileWithModularUI) { - return createTileEntityContainer( - player, - ((ITileWithModularUI) te)::createWindow, - te::markDirty, - containerConstructor); - } - return null; - }) - .gui( - ((player, - world, - x, - y, - z) -> { - if (!world.isRemote) - return null; - TileEntity te = world.getTileEntity( - x, - y, - z); - if (te instanceof ITileWithModularUI) { - return createTileEntityGuiContainer( - player, - ((ITileWithModularUI) te)::createWindow, - containerConstructor); - } - return null; - })) - .build(); + public static final Function<ContainerConstructor, UIInfo<?, ?>> GTTileEntityUIFactory = containerConstructor -> UIBuilder + .of() + .container((player, world, x, y, z) -> { + TileEntity te = world.getTileEntity(x, y, z); + if (te instanceof ITileWithModularUI) { + return createTileEntityContainer( + player, + ((ITileWithModularUI) te)::createWindow, + te::markDirty, + containerConstructor); + } + return null; + }) + .gui(((player, world, x, y, z) -> { + if (!world.isRemote) return null; + TileEntity te = world.getTileEntity(x, y, z); + if (te instanceof ITileWithModularUI) { + return createTileEntityGuiContainer( + player, + ((ITileWithModularUI) te)::createWindow, + containerConstructor); + } + return null; + })) + .build(); private static final UIInfo<?, ?> GTTileEntityDefaultUI = GTTileEntityUIFactory.apply(ModularUIContainer::new); @@ -85,33 +70,33 @@ public class GT_UIInfos { for (byte i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { final byte side = i; coverUI.put( - side, - UIBuilder.of() - .container((player, world, x, y, z) -> { - final TileEntity te = world.getTileEntity(x, y, z); - if (!(te instanceof ICoverable gtTileEntity)) return null; - GT_CoverBehaviorBase<?> cover = gtTileEntity.getCoverBehaviorAtSideNew(side); - return createCoverContainer( - player, - cover::createWindow, - te::markDirty, - gtTileEntity.getCoverIDAtSide(side), - side, - gtTileEntity); - }) - .gui((player, world, x, y, z) -> { - if (!world.isRemote) return null; - final TileEntity te = world.getTileEntity(x, y, z); - if (!(te instanceof ICoverable gtTileEntity)) return null; - final GT_CoverBehaviorBase<?> cover = gtTileEntity.getCoverBehaviorAtSideNew(side); - return createCoverGuiContainer( - player, - cover::createWindow, - gtTileEntity.getCoverIDAtSide(side), - side, - gtTileEntity); - }) - .build()); + side, + UIBuilder.of() + .container((player, world, x, y, z) -> { + final TileEntity te = world.getTileEntity(x, y, z); + if (!(te instanceof ICoverable gtTileEntity)) return null; + GT_CoverBehaviorBase<?> cover = gtTileEntity.getCoverBehaviorAtSideNew(side); + return createCoverContainer( + player, + cover::createWindow, + te::markDirty, + gtTileEntity.getCoverIDAtSide(side), + side, + gtTileEntity); + }) + .gui((player, world, x, y, z) -> { + if (!world.isRemote) return null; + final TileEntity te = world.getTileEntity(x, y, z); + if (!(te instanceof ICoverable gtTileEntity)) return null; + final GT_CoverBehaviorBase<?> cover = gtTileEntity.getCoverBehaviorAtSideNew(side); + return createCoverGuiContainer( + player, + cover::createWindow, + gtTileEntity.getCoverIDAtSide(side), + side, + gtTileEntity); + }) + .build()); } } @@ -121,11 +106,11 @@ public class GT_UIInfos { public static void openGTTileEntityUI(IHasWorldObjectAndCoords aTileEntity, EntityPlayer aPlayer) { if (aTileEntity.isClientSide()) return; GTTileEntityDefaultUI.open( - aPlayer, - aTileEntity.getWorld(), - aTileEntity.getXCoord(), - aTileEntity.getYCoord(), - aTileEntity.getZCoord()); + aPlayer, + aTileEntity.getWorld(), + aTileEntity.getXCoord(), + aTileEntity.getYCoord(), + aTileEntity.getZCoord()); } /** @@ -135,20 +120,20 @@ public class GT_UIInfos { if (tileEntity.isClientSide()) return; GT_Values.NW.sendToPlayer( - new GT_Packet_SendCoverData( - side, - tileEntity.getCoverIDAtSide(side), - tileEntity.getComplexCoverDataAtSide(side), - tileEntity), - (EntityPlayerMP) player); + new GT_Packet_SendCoverData( + side, + tileEntity.getCoverIDAtSide(side), + tileEntity.getComplexCoverDataAtSide(side), + tileEntity), + (EntityPlayerMP) player); coverUI.get(side) - .open( - player, - tileEntity.getWorld(), - tileEntity.getXCoord(), - tileEntity.getYCoord(), - tileEntity.getZCoord()); + .open( + player, + tileEntity.getWorld(), + tileEntity.getXCoord(), + tileEntity.getYCoord(), + tileEntity.getZCoord()); } /** @@ -161,8 +146,8 @@ public class GT_UIInfos { } private static ModularUIContainer createTileEntityContainer(EntityPlayer player, - Function<UIBuildContext, ModularWindow> windowCreator, Runnable onWidgetUpdate, - ContainerConstructor containerCreator) { + Function<UIBuildContext, ModularWindow> windowCreator, Runnable onWidgetUpdate, + ContainerConstructor containerCreator) { final UIBuildContext buildContext = new UIBuildContext(player); final ModularWindow window = windowCreator.apply(buildContext); if (window == null) return null; @@ -171,19 +156,19 @@ public class GT_UIInfos { @SideOnly(Side.CLIENT) private static ModularGui createTileEntityGuiContainer(EntityPlayer player, - Function<UIBuildContext, ModularWindow> windowCreator, ContainerConstructor containerConstructor) { + Function<UIBuildContext, ModularWindow> windowCreator, ContainerConstructor containerConstructor) { final ModularUIContainer container = createTileEntityContainer( - player, - windowCreator, - null, - containerConstructor); + player, + windowCreator, + null, + containerConstructor); if (container == null) return null; return new ModularGui(container); } private static ModularUIContainer createCoverContainer(EntityPlayer player, - Function<GT_CoverUIBuildContext, ModularWindow> windowCreator, Runnable onWidgetUpdate, int coverID, - byte side, ICoverable tile) { + Function<GT_CoverUIBuildContext, ModularWindow> windowCreator, Runnable onWidgetUpdate, int coverID, byte side, + ICoverable tile) { final GT_CoverUIBuildContext buildContext = new GT_CoverUIBuildContext(player, coverID, side, tile, false); final ModularWindow window = windowCreator.apply(buildContext); if (window == null) return null; @@ -192,7 +177,7 @@ public class GT_UIInfos { @SideOnly(Side.CLIENT) private static ModularGui createCoverGuiContainer(EntityPlayer player, - Function<GT_CoverUIBuildContext, ModularWindow> windowCreator, int coverID, byte side, ICoverable tile) { + Function<GT_CoverUIBuildContext, ModularWindow> windowCreator, int coverID, byte side, ICoverable tile) { final ModularUIContainer container = createCoverContainer(player, windowCreator, null, coverID, side, tile); if (container == null) { return null; diff --git a/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java index ff05f23d25..e8c9f192a6 100644 --- a/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java +++ b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java @@ -13,182 +13,120 @@ public class GT_UITextures { public static final UITexture TRANSPARENT = UITexture.fullImage(GregTech.ID, "gui/picture/transparent"); - public static final AdaptableUITexture BACKGROUND_SINGLEBLOCK_DEFAULT = AdaptableUITexture.of( - GregTech.ID, - "gui/background/singleblock_default", - 176, - 166, - 4); - public static final SteamTexture BACKGROUND_STEAM = SteamTexture.adaptableTexture( - GregTech.ID, - "gui/background/%s", - 176, - 166, - 4); - public static final UITexture BACKGROUND_FUSION_COMPUTER = UITexture.fullImage( - GregTech.ID, - "gui/background/fusion_computer"); - public static final AdaptableUITexture BACKGROUND_TEXT_FIELD = AdaptableUITexture.of( - GregTech.ID, - "gui/background/text_field", - 142, - 28, - 1); - public static final AdaptableUITexture BACKGROUND_TEXT_FIELD_LIGHT_GRAY = AdaptableUITexture.of( - GregTech.ID, - "gui/background/text_field_light_gray", - 61, - 12, - 1); + public static final AdaptableUITexture BACKGROUND_SINGLEBLOCK_DEFAULT = AdaptableUITexture + .of(GregTech.ID, "gui/background/singleblock_default", 176, 166, 4); + public static final SteamTexture BACKGROUND_STEAM = SteamTexture + .adaptableTexture(GregTech.ID, "gui/background/%s", 176, 166, 4); + public static final UITexture BACKGROUND_FUSION_COMPUTER = UITexture + .fullImage(GregTech.ID, "gui/background/fusion_computer"); + public static final AdaptableUITexture BACKGROUND_TEXT_FIELD = AdaptableUITexture + .of(GregTech.ID, "gui/background/text_field", 142, 28, 1); + public static final AdaptableUITexture BACKGROUND_TEXT_FIELD_LIGHT_GRAY = AdaptableUITexture + .of(GregTech.ID, "gui/background/text_field_light_gray", 61, 12, 1); public static final SteamTexture SLOT_ITEM_STEAM = SteamTexture.fullImage(GregTech.ID, "gui/slot/item_%s"); public static final SteamTexture SLOT_FLUID_STEAM = SteamTexture.fullImage(GregTech.ID, "gui/slot/fluid_%s"); - public static final AdaptableUITexture SLOT_DARK_GRAY = AdaptableUITexture.of( - GregTech.ID, - "gui/slot/dark_gray", - 18, - 18, - 1); - public static final AdaptableUITexture SLOT_MAINTENANCE = AdaptableUITexture.of( - GregTech.ID, - "gui/slot/maintenance", - 20, - 20, - 1); - public static final AdaptableUITexture SLOT_UPLIFTED = AdaptableUITexture.of( - GregTech.ID, - "gui/slot/uplifted", - 18, - 18, - 1); + public static final AdaptableUITexture SLOT_DARK_GRAY = AdaptableUITexture + .of(GregTech.ID, "gui/slot/dark_gray", 18, 18, 1); + public static final AdaptableUITexture SLOT_MAINTENANCE = AdaptableUITexture + .of(GregTech.ID, "gui/slot/maintenance", 20, 20, 1); + public static final AdaptableUITexture SLOT_UPLIFTED = AdaptableUITexture + .of(GregTech.ID, "gui/slot/uplifted", 18, 18, 1); public static final UITexture OVERLAY_SLOT_ARROW_ME = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/arrow_me"); public static final UITexture OVERLAY_SLOT_BEAKER_1 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/beaker_1"); public static final UITexture OVERLAY_SLOT_BEAKER_2 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/beaker_2"); - public static final UITexture OVERLAY_SLOT_BEE_DRONE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/bee_drone"); - public static final UITexture OVERLAY_SLOT_BEE_QUEEN = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/bee_queen"); + public static final UITexture OVERLAY_SLOT_BEE_DRONE = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/bee_drone"); + public static final UITexture OVERLAY_SLOT_BEE_QUEEN = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/bee_queen"); public static final UITexture OVERLAY_SLOT_BENDER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/bender"); public static final UITexture OVERLAY_SLOT_BOX = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/box"); public static final UITexture OVERLAY_SLOT_BOXED = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/boxed"); public static final UITexture OVERLAY_SLOT_CANISTER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/canister"); - public static final SteamTexture OVERLAY_SLOT_CANISTER_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/canister_%s"); + public static final SteamTexture OVERLAY_SLOT_CANISTER_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/canister_%s"); public static final UITexture OVERLAY_SLOT_CANNER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/canner"); public static final UITexture OVERLAY_SLOT_CAULDRON = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/cauldron"); - public static final UITexture OVERLAY_SLOT_CENTRIFUGE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/centrifuge"); - public static final UITexture OVERLAY_SLOT_CENTRIFUGE_FLUID = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/centrifuge_fluid"); - public static final SteamTexture OVERLAY_SLOT_CENTRIFUGE_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/centrifuge_%s"); + public static final UITexture OVERLAY_SLOT_CENTRIFUGE = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/centrifuge"); + public static final UITexture OVERLAY_SLOT_CENTRIFUGE_FLUID = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/centrifuge_fluid"); + public static final SteamTexture OVERLAY_SLOT_CENTRIFUGE_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/centrifuge_%s"); public static final UITexture OVERLAY_SLOT_CHARGER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/charger"); - public static final UITexture OVERLAY_SLOT_CHARGER_FLUID = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/charger_fluid"); + public static final UITexture OVERLAY_SLOT_CHARGER_FLUID = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/charger_fluid"); public static final UITexture OVERLAY_SLOT_CIRCUIT = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/circuit"); - public static final SteamTexture OVERLAY_SLOT_COAL_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/coal_%s"); - public static final UITexture OVERLAY_SLOT_COMPRESSOR = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/compressor"); - public static final SteamTexture OVERLAY_SLOT_COMPRESSOR_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/compressor_%s"); - public static final UITexture OVERLAY_SLOT_CRUSHED_ORE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/crushed_ore"); - public static final SteamTexture OVERLAY_SLOT_CRUSHED_ORE_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/crushed_ore_%s"); - public static final UITexture OVERLAY_SLOT_CUTTER_SLICED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/cutter_sliced"); + public static final SteamTexture OVERLAY_SLOT_COAL_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/coal_%s"); + public static final UITexture OVERLAY_SLOT_COMPRESSOR = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/compressor"); + public static final SteamTexture OVERLAY_SLOT_COMPRESSOR_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/compressor_%s"); + public static final UITexture OVERLAY_SLOT_CRUSHED_ORE = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/crushed_ore"); + public static final SteamTexture OVERLAY_SLOT_CRUSHED_ORE_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/crushed_ore_%s"); + public static final UITexture OVERLAY_SLOT_CUTTER_SLICED = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/cutter_sliced"); public static final UITexture OVERLAY_SLOT_DATA_ORB = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/data_orb"); - public static final UITexture OVERLAY_SLOT_DATA_STICK = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/data_stick"); + public static final UITexture OVERLAY_SLOT_DATA_STICK = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/data_stick"); public static final UITexture OVERLAY_SLOT_DUST = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/dust"); - public static final SteamTexture OVERLAY_SLOT_DUST_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/dust_%s"); - public static final SteamTexture OVERLAY_SLOT_BLOCK_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/block_%s"); - public static final UITexture OVERLAY_SLOT_EXPLOSIVE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/explosive"); - public static final UITexture OVERLAY_SLOT_EXTRUDER_SHAPE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/extruder_shape"); + public static final SteamTexture OVERLAY_SLOT_DUST_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/dust_%s"); + public static final SteamTexture OVERLAY_SLOT_BLOCK_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/block_%s"); + public static final UITexture OVERLAY_SLOT_EXPLOSIVE = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/explosive"); + public static final UITexture OVERLAY_SLOT_EXTRUDER_SHAPE = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/extruder_shape"); public static final UITexture OVERLAY_SLOT_FURNACE = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/furnace"); - public static final SteamTexture OVERLAY_SLOT_FURNACE_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/furnace_%s"); + public static final SteamTexture OVERLAY_SLOT_FURNACE_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/furnace_%s"); public static final UITexture OVERLAY_SLOT_GEM = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/gem"); public static final UITexture OVERLAY_SLOT_HAMMER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/hammer"); - public static final SteamTexture OVERLAY_SLOT_HAMMER_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/hammer_%s"); + public static final SteamTexture OVERLAY_SLOT_HAMMER_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/hammer_%s"); public static final UITexture OVERLAY_SLOT_HEATER_1 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/heater_1"); public static final UITexture OVERLAY_SLOT_HEATER_2 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/heater_2"); - public static final UITexture OVERLAY_SLOT_IMPLOSION = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/implosion"); + public static final UITexture OVERLAY_SLOT_IMPLOSION = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/implosion"); public static final UITexture OVERLAY_SLOT_IN = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/in"); - public static final SteamTexture OVERLAY_SLOT_IN_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/in_%s"); - public static final SteamTexture OVERLAY_SLOT_INGOT_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/ingot_%s"); - public static final UITexture OVERLAY_SLOT_INT_CIRCUIT = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/int_circuit"); + public static final SteamTexture OVERLAY_SLOT_IN_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/in_%s"); + public static final SteamTexture OVERLAY_SLOT_INGOT_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/ingot_%s"); + public static final UITexture OVERLAY_SLOT_INT_CIRCUIT = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/int_circuit"); public static final UITexture OVERLAY_SLOT_LENS = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/lens"); - public static final UITexture OVERLAY_SLOT_MICROSCOPE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/microscope"); + public static final UITexture OVERLAY_SLOT_MICROSCOPE = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/microscope"); public static final UITexture OVERLAY_SLOT_MOLD = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/mold"); - public static final UITexture OVERLAY_SLOT_MOLECULAR_1 = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/molecular_1"); - public static final UITexture OVERLAY_SLOT_MOLECULAR_2 = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/molecular_2"); - public static final UITexture OVERLAY_SLOT_MOLECULAR_3 = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/molecular_3"); + public static final UITexture OVERLAY_SLOT_MOLECULAR_1 = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/molecular_1"); + public static final UITexture OVERLAY_SLOT_MOLECULAR_2 = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/molecular_2"); + public static final UITexture OVERLAY_SLOT_MOLECULAR_3 = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/molecular_3"); public static final UITexture OVERLAY_SLOT_OUT = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/out"); - public static final SteamTexture OVERLAY_SLOT_OUT_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/overlay_slot/out_%s"); - public static final UITexture OVERLAY_SLOT_PAGE_BLANK = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/page_blank"); - public static final UITexture OVERLAY_SLOT_PAGE_PRINTED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/page_printed"); + public static final SteamTexture OVERLAY_SLOT_OUT_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/overlay_slot/out_%s"); + public static final UITexture OVERLAY_SLOT_PAGE_BLANK = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/page_blank"); + public static final UITexture OVERLAY_SLOT_PAGE_PRINTED = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/page_printed"); public static final UITexture OVERLAY_SLOT_PRESS_1 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/press_1"); public static final UITexture OVERLAY_SLOT_PRESS_2 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/press_2"); public static final UITexture OVERLAY_SLOT_PRESS_3 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/press_3"); public static final UITexture OVERLAY_SLOT_RECYCLE = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/recycle"); public static final UITexture OVERLAY_SLOT_ROD_1 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/rod_1"); public static final UITexture OVERLAY_SLOT_ROD_2 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/rod_2"); - public static final UITexture OVERLAY_SLOT_SLICE_SHAPE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/slice_shape"); - public static final UITexture OVERLAY_SLOT_SLICER_SLICED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/slicer_sliced"); + public static final UITexture OVERLAY_SLOT_SLICE_SHAPE = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/slice_shape"); + public static final UITexture OVERLAY_SLOT_SLICER_SLICED = UITexture + .fullImage(GregTech.ID, "gui/overlay_slot/slicer_sliced"); public static final UITexture OVERLAY_SLOT_SQUARE = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/square"); public static final UITexture OVERLAY_SLOT_UUA = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/uua"); public static final UITexture OVERLAY_SLOT_UUM = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/uum"); @@ -197,82 +135,60 @@ public class GT_UITextures { public static final UITexture OVERLAY_SLOT_WIREMILL = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/wiremill"); public static final UITexture OVERLAY_SLOT_WRENCH = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/wrench"); public static final UITexture[] OVERLAY_SLOTS_NUMBER = IntStream.range(0, 12) - .mapToObj( - i -> UITexture.fullImage( - GregTech.ID, - "gui/overlay_slot/number_" + i)) - .collect(Collectors.toList()) - .toArray(new UITexture[0]); + .mapToObj(i -> UITexture.fullImage(GregTech.ID, "gui/overlay_slot/number_" + i)) + .collect(Collectors.toList()) + .toArray(new UITexture[0]); public static final UITexture PROGRESSBAR_ARROW = UITexture.fullImage(GregTech.ID, "gui/progressbar/arrow"); - public static final SteamTexture PROGRESSBAR_ARROW_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/progressbar/arrow_%s"); - public static final SteamTexture PROGRESSBAR_ARROW_2_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/progressbar/arrow_2_%s"); - public static final UITexture PROGRESSBAR_ARROW_MULTIPLE = UITexture.fullImage( - GregTech.ID, - "gui/progressbar/arrow_multiple"); + public static final SteamTexture PROGRESSBAR_ARROW_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/progressbar/arrow_%s"); + public static final SteamTexture PROGRESSBAR_ARROW_2_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/progressbar/arrow_2_%s"); + public static final UITexture PROGRESSBAR_ARROW_MULTIPLE = UITexture + .fullImage(GregTech.ID, "gui/progressbar/arrow_multiple"); public static final UITexture PROGRESSBAR_ASSEMBLE = UITexture.fullImage(GregTech.ID, "gui/progressbar/assemble"); - public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_1 = UITexture.fullImage( - GregTech.ID, - "gui/progressbar/assemblyline_1"); - public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_2 = UITexture.fullImage( - GregTech.ID, - "gui/progressbar/assemblyline_2"); - public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_3 = UITexture.fullImage( - GregTech.ID, - "gui/progressbar/assemblyline_3"); + public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_1 = UITexture + .fullImage(GregTech.ID, "gui/progressbar/assemblyline_1"); + public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_2 = UITexture + .fullImage(GregTech.ID, "gui/progressbar/assemblyline_2"); + public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_3 = UITexture + .fullImage(GregTech.ID, "gui/progressbar/assemblyline_3"); public static final UITexture PROGRESSBAR_BATH = UITexture.fullImage(GregTech.ID, "gui/progressbar/bath"); public static final UITexture PROGRESSBAR_BENDING = UITexture.fullImage(GregTech.ID, "gui/progressbar/bending"); - public static final SteamTexture PROGRESSBAR_BOILER_EMPTY_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/progressbar/boiler_empty_%s"); - public static final UITexture PROGRESSBAR_BOILER_HEAT = UITexture.fullImage( - GregTech.ID, - "gui/progressbar/boiler_heat"); - public static final UITexture PROGRESSBAR_BOILER_STEAM = UITexture.fullImage( - GregTech.ID, - "gui/progressbar/boiler_steam"); - public static final UITexture PROGRESSBAR_BOILER_WATER = UITexture.fullImage( - GregTech.ID, - "gui/progressbar/boiler_water"); + public static final SteamTexture PROGRESSBAR_BOILER_EMPTY_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/progressbar/boiler_empty_%s"); + public static final UITexture PROGRESSBAR_BOILER_HEAT = UITexture + .fullImage(GregTech.ID, "gui/progressbar/boiler_heat"); + public static final UITexture PROGRESSBAR_BOILER_STEAM = UITexture + .fullImage(GregTech.ID, "gui/progressbar/boiler_steam"); + public static final UITexture PROGRESSBAR_BOILER_WATER = UITexture + .fullImage(GregTech.ID, "gui/progressbar/boiler_water"); public static final UITexture PROGRESSBAR_CANNER = UITexture.fullImage(GregTech.ID, "gui/progressbar/canner"); - public static final UITexture PROGRESSBAR_CIRCUIT_ASSEMBLER = UITexture.fullImage( - GregTech.ID, - "gui/progressbar/circuit_assembler"); + public static final UITexture PROGRESSBAR_CIRCUIT_ASSEMBLER = UITexture + .fullImage(GregTech.ID, "gui/progressbar/circuit_assembler"); public static final UITexture PROGRESSBAR_COMPRESS = UITexture.fullImage(GregTech.ID, "gui/progressbar/compress"); - public static final SteamTexture PROGRESSBAR_COMPRESS_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/progressbar/compress_%s"); + public static final SteamTexture PROGRESSBAR_COMPRESS_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/progressbar/compress_%s"); public static final UITexture PROGRESSBAR_CUT = UITexture.fullImage(GregTech.ID, "gui/progressbar/cut"); public static final UITexture PROGRESSBAR_EXTRACT = UITexture.fullImage(GregTech.ID, "gui/progressbar/extract"); - public static final SteamTexture PROGRESSBAR_EXTRACT_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/progressbar/extract_%s"); + public static final SteamTexture PROGRESSBAR_EXTRACT_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/progressbar/extract_%s"); public static final UITexture PROGRESSBAR_EXTRUDE = UITexture.fullImage(GregTech.ID, "gui/progressbar/extrude"); - public static final SteamTexture PROGRESSBAR_FUEL_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/progressbar/fuel_%s"); + public static final SteamTexture PROGRESSBAR_FUEL_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/progressbar/fuel_%s"); public static final UITexture PROGRESSBAR_HAMMER = UITexture.fullImage(GregTech.ID, "gui/progressbar/hammer"); - public static final UITexture PROGRESSBAR_HAMMER_BASE = UITexture.fullImage( - GregTech.ID, - "gui/progressbar/hammer_base"); - public static final SteamTexture PROGRESSBAR_HAMMER_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/progressbar/hammer_%s"); - public static final SteamTexture PROGRESSBAR_HAMMER_BASE_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/progressbar/hammer_base_%s"); + public static final UITexture PROGRESSBAR_HAMMER_BASE = UITexture + .fullImage(GregTech.ID, "gui/progressbar/hammer_base"); + public static final SteamTexture PROGRESSBAR_HAMMER_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/progressbar/hammer_%s"); + public static final SteamTexture PROGRESSBAR_HAMMER_BASE_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/progressbar/hammer_base_%s"); public static final UITexture PROGRESSBAR_LATHE = UITexture.fullImage(GregTech.ID, "gui/progressbar/lathe"); - public static final UITexture PROGRESSBAR_LATHE_BASE = UITexture.fullImage( - GregTech.ID, - "gui/progressbar/lathe_base"); + public static final UITexture PROGRESSBAR_LATHE_BASE = UITexture + .fullImage(GregTech.ID, "gui/progressbar/lathe_base"); public static final UITexture PROGRESSBAR_MACERATE = UITexture.fullImage(GregTech.ID, "gui/progressbar/macerate"); - public static final SteamTexture PROGRESSBAR_MACERATE_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/progressbar/macerate_%s"); + public static final SteamTexture PROGRESSBAR_MACERATE_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/progressbar/macerate_%s"); public static final UITexture PROGRESSBAR_MAGNET = UITexture.fullImage(GregTech.ID, "gui/progressbar/magnet"); public static final UITexture PROGRESSBAR_MIXER = UITexture.fullImage(GregTech.ID, "gui/progressbar/mixer"); public static final UITexture PROGRESSBAR_RECYCLE = UITexture.fullImage(GregTech.ID, "gui/progressbar/recycle"); @@ -284,347 +200,242 @@ public class GT_UITextures { public static final UITexture TAB_COVER_NORMAL = UITexture.fullImage(GregTech.ID, "gui/tab/cover_normal"); public static final UITexture TAB_COVER_HIGHLIGHT = UITexture.fullImage(GregTech.ID, "gui/tab/cover_highlight"); public static final UITexture TAB_COVER_DISABLED = UITexture.fullImage(GregTech.ID, "gui/tab/cover_disabled"); - public static final SteamTexture TAB_COVER_STEAM_NORMAL = SteamTexture.fullImage( - GregTech.ID, - "gui/tab/cover_%s_normal"); - public static final SteamTexture TAB_COVER_STEAM_HIGHLIGHT = SteamTexture.fullImage( - GregTech.ID, - "gui/tab/cover_%s_highlight"); - public static final SteamTexture TAB_COVER_STEAM_DISABLED = SteamTexture.fullImage( - GregTech.ID, - "gui/tab/cover_%s_disabled"); + public static final SteamTexture TAB_COVER_STEAM_NORMAL = SteamTexture + .fullImage(GregTech.ID, "gui/tab/cover_%s_normal"); + public static final SteamTexture TAB_COVER_STEAM_HIGHLIGHT = SteamTexture + .fullImage(GregTech.ID, "gui/tab/cover_%s_highlight"); + public static final SteamTexture TAB_COVER_STEAM_DISABLED = SteamTexture + .fullImage(GregTech.ID, "gui/tab/cover_%s_disabled"); public static final AdaptableUITexture TAB_TITLE = AdaptableUITexture.of(GregTech.ID, "gui/tab/title", 28, 28, 4); - public static final AdaptableUITexture TAB_TITLE_DARK = AdaptableUITexture.of( - GregTech.ID, - "gui/tab/title_dark", - 28, - 28, - 4); - public static final SteamTexture TAB_TITLE_STEAM = SteamTexture.adaptableTexture( - GregTech.ID, - "gui/tab/title_%s", - 28, - 28, - 4); - public static final SteamTexture TAB_TITLE_DARK_STEAM = SteamTexture.adaptableTexture( - GregTech.ID, - "gui/tab/title_dark_%s", - 28, - 28, - 4); - public static final AdaptableUITexture TAB_TITLE_ANGULAR = AdaptableUITexture.of( - GregTech.ID, - "gui/tab/title_angular", - 28, - 28, - 4); - public static final SteamTexture TAB_TITLE_ANGULAR_STEAM = SteamTexture.adaptableTexture( - GregTech.ID, - "gui/tab/title_angular_%s", - 28, - 28, - 4); + public static final AdaptableUITexture TAB_TITLE_DARK = AdaptableUITexture + .of(GregTech.ID, "gui/tab/title_dark", 28, 28, 4); + public static final SteamTexture TAB_TITLE_STEAM = SteamTexture + .adaptableTexture(GregTech.ID, "gui/tab/title_%s", 28, 28, 4); + public static final SteamTexture TAB_TITLE_DARK_STEAM = SteamTexture + .adaptableTexture(GregTech.ID, "gui/tab/title_dark_%s", 28, 28, 4); + public static final AdaptableUITexture TAB_TITLE_ANGULAR = AdaptableUITexture + .of(GregTech.ID, "gui/tab/title_angular", 28, 28, 4); + public static final SteamTexture TAB_TITLE_ANGULAR_STEAM = SteamTexture + .adaptableTexture(GregTech.ID, "gui/tab/title_angular_%s", 28, 28, 4); - public static final UITexture BUTTON_STANDARD = AdaptableUITexture.of( - GregTech.ID, - "gui/button/standard", - 18, - 18, - 1); - public static final UITexture BUTTON_STANDARD_DISABLED = AdaptableUITexture.of( - GregTech.ID, - "gui/button/standard_disabled", - 18, - 18, - 1); - public static final UITexture BUTTON_STANDARD_TOGGLE = AdaptableUITexture.of( - GregTech.ID, - "gui/button/standard_toggle", - 18, - 18, - 1); - public static final UITexture BUTTON_STANDARD_TOGGLE_DISABLED = AdaptableUITexture.of( - GregTech.ID, - "gui/button/standard_toggle_disabled", - 18, - 18, - 1); + public static final UITexture BUTTON_STANDARD = AdaptableUITexture + .of(GregTech.ID, "gui/button/standard", 18, 18, 1); + public static final UITexture BUTTON_STANDARD_DISABLED = AdaptableUITexture + .of(GregTech.ID, "gui/button/standard_disabled", 18, 18, 1); + public static final UITexture BUTTON_STANDARD_TOGGLE = AdaptableUITexture + .of(GregTech.ID, "gui/button/standard_toggle", 18, 18, 1); + public static final UITexture BUTTON_STANDARD_TOGGLE_DISABLED = AdaptableUITexture + .of(GregTech.ID, "gui/button/standard_toggle_disabled", 18, 18, 1); public static final UITexture BUTTON_COVER_NORMAL = UITexture.fullImage(GregTech.ID, "gui/button/cover_normal"); - public static final UITexture BUTTON_COVER_NORMAL_HOVERED = UITexture.fullImage( - GregTech.ID, - "gui/button/cover_normal_hovered"); - public static final UITexture BUTTON_COVER_NORMAL_DISABLED = UITexture.fullImage( - GregTech.ID, - "gui/button/cover_normal_disabled"); + public static final UITexture BUTTON_COVER_NORMAL_HOVERED = UITexture + .fullImage(GregTech.ID, "gui/button/cover_normal_hovered"); + public static final UITexture BUTTON_COVER_NORMAL_DISABLED = UITexture + .fullImage(GregTech.ID, "gui/button/cover_normal_disabled"); - public static final UITexture OVERLAY_BUTTON_DISABLE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/disable"); - public static final UITexture OVERLAY_BUTTON_REDSTONE_OFF = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/redstone_off"); - public static final UITexture OVERLAY_BUTTON_REDSTONE_ON = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/redstone_on"); - public static final UITexture OVERLAY_BUTTON_POWER_SWITCH_ON = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/power_switch_on"); - public static final UITexture OVERLAY_BUTTON_POWER_SWITCH_OFF = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/power_switch_off"); - public static final UITexture OVERLAY_BUTTON_VOID_EXCESS_ON = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/void_excess_on"); - public static final UITexture OVERLAY_BUTTON_VOID_EXCESS_ON_DISABLED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/void_excess_on_disabled"); - public static final UITexture OVERLAY_BUTTON_VOID_EXCESS_OFF = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/void_excess_off"); - public static final UITexture OVERLAY_BUTTON_VOID_EXCESS_OFF_DISABLED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/void_excess_off_disabled"); - public static final UITexture OVERLAY_BUTTON_INPUT_SEPARATION_ON = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/input_separation_on"); - public static final UITexture OVERLAY_BUTTON_INPUT_SEPARATION_ON_DISABLED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/input_separation_on_disabled"); - public static final UITexture OVERLAY_BUTTON_INPUT_SEPARATION_OFF = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/input_separation_off"); - public static final UITexture OVERLAY_BUTTON_INPUT_SEPARATION_OFF_DISABLED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/input_separation_off_disabled"); - public static final UITexture OVERLAY_BUTTON_RECIPE_LOCKED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/recipe_locked"); - public static final UITexture OVERLAY_BUTTON_RECIPE_LOCKED_DISABLED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/recipe_locked_disabled"); - public static final UITexture OVERLAY_BUTTON_RECIPE_UNLOCKED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/recipe_unlocked"); - public static final UITexture OVERLAY_BUTTON_RECIPE_UNLOCKED_DISABLED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/recipe_unlocked_disabled"); - public static final UITexture OVERLAY_BUTTON_BATCH_MODE_ON = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/batch_mode_on"); - public static final UITexture OVERLAY_BUTTON_BATCH_MODE_ON_DISABLED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/batch_mode_on_disabled"); - public static final UITexture OVERLAY_BUTTON_BATCH_MODE_OFF = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/batch_mode_off"); - public static final UITexture OVERLAY_BUTTON_BATCH_MODE_OFF_DISABLED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/batch_mode_off_disabled"); - public static final UITexture OVERLAY_BUTTON_DOWN_TIERING_ON = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/down_tiering_on"); - public static final UITexture OVERLAY_BUTTON_DOWN_TIERING_OFF = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/down_tiering_off"); - public static final UITexture OVERLAY_BUTTON_CHECKMARK = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/checkmark"); + public static final UITexture OVERLAY_BUTTON_DISABLE = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/disable"); + public static final UITexture OVERLAY_BUTTON_REDSTONE_OFF = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/redstone_off"); + public static final UITexture OVERLAY_BUTTON_REDSTONE_ON = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/redstone_on"); + public static final UITexture OVERLAY_BUTTON_POWER_SWITCH_ON = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/power_switch_on"); + public static final UITexture OVERLAY_BUTTON_POWER_SWITCH_OFF = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/power_switch_off"); + public static final UITexture OVERLAY_BUTTON_VOID_EXCESS_ON = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/void_excess_on"); + public static final UITexture OVERLAY_BUTTON_VOID_EXCESS_ON_DISABLED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/void_excess_on_disabled"); + public static final UITexture OVERLAY_BUTTON_VOID_EXCESS_OFF = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/void_excess_off"); + public static final UITexture OVERLAY_BUTTON_VOID_EXCESS_OFF_DISABLED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/void_excess_off_disabled"); + public static final UITexture OVERLAY_BUTTON_INPUT_SEPARATION_ON = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/input_separation_on"); + public static final UITexture OVERLAY_BUTTON_INPUT_SEPARATION_ON_DISABLED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/input_separation_on_disabled"); + public static final UITexture OVERLAY_BUTTON_INPUT_SEPARATION_OFF = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/input_separation_off"); + public static final UITexture OVERLAY_BUTTON_INPUT_SEPARATION_OFF_DISABLED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/input_separation_off_disabled"); + public static final UITexture OVERLAY_BUTTON_RECIPE_LOCKED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/recipe_locked"); + public static final UITexture OVERLAY_BUTTON_RECIPE_LOCKED_DISABLED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/recipe_locked_disabled"); + public static final UITexture OVERLAY_BUTTON_RECIPE_UNLOCKED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/recipe_unlocked"); + public static final UITexture OVERLAY_BUTTON_RECIPE_UNLOCKED_DISABLED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/recipe_unlocked_disabled"); + public static final UITexture OVERLAY_BUTTON_BATCH_MODE_ON = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/batch_mode_on"); + public static final UITexture OVERLAY_BUTTON_BATCH_MODE_ON_DISABLED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/batch_mode_on_disabled"); + public static final UITexture OVERLAY_BUTTON_BATCH_MODE_OFF = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/batch_mode_off"); + public static final UITexture OVERLAY_BUTTON_BATCH_MODE_OFF_DISABLED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/batch_mode_off_disabled"); + public static final UITexture OVERLAY_BUTTON_DOWN_TIERING_ON = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/down_tiering_on"); + public static final UITexture OVERLAY_BUTTON_DOWN_TIERING_OFF = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/down_tiering_off"); + public static final UITexture OVERLAY_BUTTON_CHECKMARK = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/checkmark"); public static final UITexture OVERLAY_BUTTON_CROSS = UITexture.fullImage(GregTech.ID, "gui/overlay_button/cross"); - public static final UITexture OVERLAY_BUTTON_WHITELIST = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/whitelist"); - public static final UITexture OVERLAY_BUTTON_BLACKLIST = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/blacklist"); - public static final UITexture OVERLAY_BUTTON_PROGRESS = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/progress"); + public static final UITexture OVERLAY_BUTTON_WHITELIST = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/whitelist"); + public static final UITexture OVERLAY_BUTTON_BLACKLIST = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/blacklist"); + public static final UITexture OVERLAY_BUTTON_PROGRESS = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/progress"); public static final UITexture OVERLAY_BUTTON_EXPORT = UITexture.fullImage(GregTech.ID, "gui/overlay_button/export"); public static final UITexture OVERLAY_BUTTON_IMPORT = UITexture.fullImage(GregTech.ID, "gui/overlay_button/import"); - public static final UITexture OVERLAY_BUTTON_AUTOOUTPUT_ITEM = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/autooutput_item"); - public static final UITexture OVERLAY_BUTTON_AUTOOUTPUT_FLUID = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/autooutput_fluid"); - public static final UITexture OVERLAY_BUTTON_ALLOW_INPUT = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/allow_input"); - public static final UITexture OVERLAY_BUTTON_AUTOPULL_ME = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/auto_pull_me"); - public static final UITexture OVERLAY_BUTTON_AUTOPULL_ME_DISABLED = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/auto_pull_me_disabled"); - public static final UITexture OVERLAY_BUTTON_BLOCK_INPUT = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/block_input"); - public static final UITexture OVERLAY_BUTTON_ARROW_GREEN_UP = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/arrow_green_up"); - public static final UITexture OVERLAY_BUTTON_ARROW_GREEN_DOWN = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/arrow_green_down"); + public static final UITexture OVERLAY_BUTTON_AUTOOUTPUT_ITEM = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/autooutput_item"); + public static final UITexture OVERLAY_BUTTON_AUTOOUTPUT_FLUID = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/autooutput_fluid"); + public static final UITexture OVERLAY_BUTTON_ALLOW_INPUT = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/allow_input"); + public static final UITexture OVERLAY_BUTTON_AUTOPULL_ME = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/auto_pull_me"); + public static final UITexture OVERLAY_BUTTON_AUTOPULL_ME_DISABLED = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/auto_pull_me_disabled"); + public static final UITexture OVERLAY_BUTTON_BLOCK_INPUT = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/block_input"); + public static final UITexture OVERLAY_BUTTON_ARROW_GREEN_UP = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/arrow_green_up"); + public static final UITexture OVERLAY_BUTTON_ARROW_GREEN_DOWN = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/arrow_green_down"); public static final UITexture OVERLAY_BUTTON_CYCLIC = UITexture.fullImage(GregTech.ID, "gui/overlay_button/cyclic"); - public static final UITexture OVERLAY_BUTTON_EMIT_ENERGY = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/emit_energy"); - public static final UITexture OVERLAY_BUTTON_EMIT_REDSTONE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/emit_redstone"); - public static final UITexture OVERLAY_BUTTON_INVERT_REDSTONE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/invert_redstone"); - public static final UITexture OVERLAY_BUTTON_STOCKING_MODE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/stocking_mode"); - public static final UITexture OVERLAY_BUTTON_INVERT_FILTER = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/invert_filter"); + public static final UITexture OVERLAY_BUTTON_EMIT_ENERGY = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/emit_energy"); + public static final UITexture OVERLAY_BUTTON_EMIT_REDSTONE = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/emit_redstone"); + public static final UITexture OVERLAY_BUTTON_INVERT_REDSTONE = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/invert_redstone"); + public static final UITexture OVERLAY_BUTTON_STOCKING_MODE = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/stocking_mode"); + public static final UITexture OVERLAY_BUTTON_INVERT_FILTER = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/invert_filter"); public static final UITexture OVERLAY_BUTTON_NBT = UITexture.fullImage(GregTech.ID, "gui/overlay_button/nbt"); public static final UITexture OVERLAY_BUTTON_PRINT = UITexture.fullImage(GregTech.ID, "gui/overlay_button/print"); - public static final UITexture OVERLAY_BUTTON_TRANSPOSE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/transpose"); - public static final UITexture OVERLAY_BUTTON_BOUNDING_BOX = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/bounding_box"); - public static final UITexture OVERLAY_BUTTON_MINUS_SMALL = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/minus_small"); - public static final UITexture OVERLAY_BUTTON_MINUS_LARGE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/minus_large"); - public static final UITexture OVERLAY_BUTTON_PLUS_SMALL = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/plus_small"); - public static final UITexture OVERLAY_BUTTON_PLUS_LARGE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/plus_large"); - public static final UITexture OVERLAY_BUTTON_GATE_AND = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/gate_and"); - public static final UITexture OVERLAY_BUTTON_GATE_NAND = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/gate_nand"); - public static final UITexture OVERLAY_BUTTON_GATE_OR = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/gate_or"); - public static final UITexture OVERLAY_BUTTON_GATE_NOR = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/gate_nor"); + public static final UITexture OVERLAY_BUTTON_TRANSPOSE = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/transpose"); + public static final UITexture OVERLAY_BUTTON_BOUNDING_BOX = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/bounding_box"); + public static final UITexture OVERLAY_BUTTON_MINUS_SMALL = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/minus_small"); + public static final UITexture OVERLAY_BUTTON_MINUS_LARGE = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/minus_large"); + public static final UITexture OVERLAY_BUTTON_PLUS_SMALL = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/plus_small"); + public static final UITexture OVERLAY_BUTTON_PLUS_LARGE = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/plus_large"); + public static final UITexture OVERLAY_BUTTON_GATE_AND = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/gate_and"); + public static final UITexture OVERLAY_BUTTON_GATE_NAND = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/gate_nand"); + public static final UITexture OVERLAY_BUTTON_GATE_OR = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/gate_or"); + public static final UITexture OVERLAY_BUTTON_GATE_NOR = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/gate_nor"); public static final UITexture OVERLAY_BUTTON_ANALOG = UITexture.fullImage(GregTech.ID, "gui/overlay_button/analog"); public static final UITexture OVERLAY_BUTTON_LOCK = UITexture.fullImage(GregTech.ID, "gui/overlay_button/lock"); - public static final UITexture OVERLAY_BUTTON_INPUT_FROM_OUTPUT_SIDE = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/input_from_output_side"); - public static final UITexture OVERLAY_BUTTON_VOID_EXCESS = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/void_excess"); - public static final UITexture OVERLAY_BUTTON_VOID_ALL = UITexture.fullImage( - GregTech.ID, - "gui/overlay_button/void_all"); + public static final UITexture OVERLAY_BUTTON_INPUT_FROM_OUTPUT_SIDE = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/input_from_output_side"); + public static final UITexture OVERLAY_BUTTON_VOID_EXCESS = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/void_excess"); + public static final UITexture OVERLAY_BUTTON_VOID_ALL = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/void_all"); public static final UITexture OVERLAY_BUTTON_NEI = UITexture.fullImage(GregTech.ID, "gui/overlay_button/nei"); /** * Can adjust size as needed. */ - public static final AdaptableUITexture PICTURE_SCREEN_BLACK = AdaptableUITexture.of( - GregTech.ID, - "gui/picture/screen_black", - 16, - 16, - 2); + public static final AdaptableUITexture PICTURE_SCREEN_BLACK = AdaptableUITexture + .of(GregTech.ID, "gui/picture/screen_black", 16, 16, 2); - public static final UITexture PICTURE_RADIATION_WARNING = UITexture.fullImage( - GregTech.ID, - "gui/picture/radiation_warning"); - public static final UITexture PICTURE_GT_LOGO_17x17_TRANSPARENT = UITexture.fullImage( - GregTech.ID, - "gui/picture/gt_logo_17x17_transparent"); - public static final UITexture PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY = UITexture.fullImage( - GregTech.ID, - "gui/picture/gt_logo_17x17_transparent_gray"); - public static final SteamTexture PICTURE_GT_LOGO_17x17_TRANSPARENT_STEAM = SteamTexture.fullImage( - GregTech.ID, - "gui/picture/gt_logo_17x17_transparent_%s"); + public static final UITexture PICTURE_RADIATION_WARNING = UITexture + .fullImage(GregTech.ID, "gui/picture/radiation_warning"); + public static final UITexture PICTURE_GT_LOGO_17x17_TRANSPARENT = UITexture + .fullImage(GregTech.ID, "gui/picture/gt_logo_17x17_transparent"); + public static final UITexture PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY = UITexture + .fullImage(GregTech.ID, "gui/picture/gt_logo_17x17_transparent_gray"); + public static final SteamTexture PICTURE_GT_LOGO_17x17_TRANSPARENT_STEAM = SteamTexture + .fullImage(GregTech.ID, "gui/picture/gt_logo_17x17_transparent_%s"); public static final UITexture PICTURE_GT_LOGO_18x18 = UITexture.fullImage(GregTech.ID, "gui/picture/gt_logo_18x18"); public static final UITexture PICTURE_GT_LOGO_19x19 = UITexture.fullImage(GregTech.ID, "gui/picture/gt_logo_19x19"); public static final UITexture PICTURE_INFORMATION = UITexture.fullImage(GregTech.ID, "gui/picture/information"); - public static final UITexture PICTURE_STALLED_ELECTRICITY = UITexture.fullImage( - GregTech.ID, - "gui/picture/stalled_electricity"); + public static final UITexture PICTURE_STALLED_ELECTRICITY = UITexture + .fullImage(GregTech.ID, "gui/picture/stalled_electricity"); public static final UITexture PICTURE_STALLED_STEAM = UITexture.fullImage(GregTech.ID, "gui/picture/stalled_steam"); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_RED = (width, - fromRight) -> UITexture.partly( - GregTech.ID, - "gui/picture/arrow_22_red", - 87, - 22, - fromRight ? 87 - width : 0, - 0, - fromRight ? 87 : width, - 22); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_BLUE = (width, - fromRight) -> UITexture.partly( - GregTech.ID, - "gui/picture/arrow_22_blue", - 87, - 22, - fromRight ? 87 - width : 0, - 0, - fromRight ? 87 : width, - 22); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_WHITE = (width, - fromRight) -> UITexture.partly( - GregTech.ID, - "gui/picture/arrow_22_white", - 87, - 22, - fromRight ? 87 - width : 0, - 0, - fromRight ? 87 : width, - 22); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_RED = (width, - fromRight) -> UITexture.partly( - GregTech.ID, - "gui/picture/arrow_24_red", - 69, - 24, - fromRight ? 69 - width : 0, - 0, - fromRight ? 69 : width, - 24); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_BLUE = (width, - fromRight) -> UITexture.partly( - GregTech.ID, - "gui/picture/arrow_24_blue", - 69, - 24, - fromRight ? 69 - width : 0, - 0, - fromRight ? 69 : width, - 24); - public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_WHITE = (width, - fromRight) -> UITexture.partly( - GregTech.ID, - "gui/picture/arrow_24_white", - 69, - 24, - fromRight ? 69 - width : 0, - 0, - fromRight ? 69 : width, - 24); + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_RED = (width, fromRight) -> UITexture + .partly( + GregTech.ID, + "gui/picture/arrow_22_red", + 87, + 22, + fromRight ? 87 - width : 0, + 0, + fromRight ? 87 : width, + 22); + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_BLUE = (width, fromRight) -> UITexture + .partly( + GregTech.ID, + "gui/picture/arrow_22_blue", + 87, + 22, + fromRight ? 87 - width : 0, + 0, + fromRight ? 87 : width, + 22); + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_22_WHITE = (width, fromRight) -> UITexture + .partly( + GregTech.ID, + "gui/picture/arrow_22_white", + 87, + 22, + fromRight ? 87 - width : 0, + 0, + fromRight ? 87 : width, + 22); + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_RED = (width, fromRight) -> UITexture + .partly( + GregTech.ID, + "gui/picture/arrow_24_red", + 69, + 24, + fromRight ? 69 - width : 0, + 0, + fromRight ? 69 : width, + 24); + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_BLUE = (width, fromRight) -> UITexture + .partly( + GregTech.ID, + "gui/picture/arrow_24_blue", + 69, + 24, + fromRight ? 69 - width : 0, + 0, + fromRight ? 69 : width, + 24); + public static final BiFunction<Integer, Boolean, UITexture> PICTURE_ARROW_24_WHITE = (width, fromRight) -> UITexture + .partly( + GregTech.ID, + "gui/picture/arrow_24_white", + 69, + 24, + fromRight ? 69 - width : 0, + 0, + fromRight ? 69 : width, + 24); public static final UITexture PICTURE_FLUID_WINDOW = UITexture.fullImage(GregTech.ID, "gui/picture/fluid_window"); public static final UITexture PICTURE_FLUID_TANK = UITexture.fullImage(GregTech.ID, "gui/picture/fluid_tank"); - public static final UITexture PICTURE_SLOTS_HOLO_3BY3 = UITexture.fullImage( - GregTech.ID, - "gui/picture/slots_holo_3by3"); + public static final UITexture PICTURE_SLOTS_HOLO_3BY3 = UITexture + .fullImage(GregTech.ID, "gui/picture/slots_holo_3by3"); public static final UITexture PICTURE_ARROW_DOUBLE = UITexture.fullImage(GregTech.ID, "gui/picture/arrow_double"); public static final UITexture PICTURE_SUPER_BUFFER = UITexture.fullImage(GregTech.ID, "gui/picture/super_buffer"); - public static final UITexture PICTURE_SQUARE_LIGHT_GRAY = UITexture.fullImage( - GregTech.ID, - "gui/picture/square_light_gray"); + public static final UITexture PICTURE_SQUARE_LIGHT_GRAY = UITexture + .fullImage(GregTech.ID, "gui/picture/square_light_gray"); public static final UITexture PICTURE_GAUGE = UITexture.fullImage(GregTech.ID, "gui/picture/gauge"); public static final UITexture PICTURE_ITEM_IN = UITexture.fullImage(GregTech.ID, "gui/picture/item_in"); public static final UITexture PICTURE_ITEM_OUT = UITexture.fullImage(GregTech.ID, "gui/picture/item_out"); diff --git a/src/main/java/gregtech/api/gui/modularui/GUITextureSet.java b/src/main/java/gregtech/api/gui/modularui/GUITextureSet.java index 2799738344..09f31d9c69 100644 --- a/src/main/java/gregtech/api/gui/modularui/GUITextureSet.java +++ b/src/main/java/gregtech/api/gui/modularui/GUITextureSet.java @@ -28,46 +28,30 @@ public class GUITextureSet { private AdaptableUITexture titleTabAngular; private UITexture gregtechLogo; - public static final GUITextureSet DEFAULT = new GUITextureSet().setMainBackground( - GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT) - .setItemSlot(ModularUITextures.ITEM_SLOT) - .setFluidSlot(ModularUITextures.FLUID_SLOT) - .setCoverTab( - GT_UITextures.TAB_COVER_NORMAL, - GT_UITextures.TAB_COVER_HIGHLIGHT, - GT_UITextures.TAB_COVER_DISABLED) - .setTitleTab( - GT_UITextures.TAB_TITLE, - GT_UITextures.TAB_TITLE_DARK, - GT_UITextures.TAB_TITLE_ANGULAR) - .setGregTechLogo( - GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT); - - public static final Function<SteamVariant, GUITextureSet> STEAM = steamVariant -> new GUITextureSet().setMainBackground( - GT_UITextures.BACKGROUND_STEAM.get(steamVariant)) - .setItemSlot( - GT_UITextures.SLOT_ITEM_STEAM.get( - steamVariant)) - .setFluidSlot( - GT_UITextures.SLOT_FLUID_STEAM.get( - steamVariant)) - .setCoverTab( - GT_UITextures.TAB_COVER_STEAM_NORMAL.get( - steamVariant), - GT_UITextures.TAB_COVER_STEAM_HIGHLIGHT.get( - steamVariant), - GT_UITextures.TAB_COVER_STEAM_DISABLED.get( - steamVariant)) - .setTitleTab( - GT_UITextures.TAB_TITLE_STEAM.getAdaptable( - steamVariant), - GT_UITextures.TAB_TITLE_DARK_STEAM.getAdaptable( - steamVariant), - GT_UITextures.TAB_TITLE_ANGULAR_STEAM.getAdaptable( - steamVariant)) - .setGregTechLogo( - GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT_STEAM.get( - steamVariant)); + public static final GUITextureSet DEFAULT = new GUITextureSet() + .setMainBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT) + .setItemSlot(ModularUITextures.ITEM_SLOT) + .setFluidSlot(ModularUITextures.FLUID_SLOT) + .setCoverTab( + GT_UITextures.TAB_COVER_NORMAL, + GT_UITextures.TAB_COVER_HIGHLIGHT, + GT_UITextures.TAB_COVER_DISABLED) + .setTitleTab(GT_UITextures.TAB_TITLE, GT_UITextures.TAB_TITLE_DARK, GT_UITextures.TAB_TITLE_ANGULAR) + .setGregTechLogo(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT); + + public static final Function<SteamVariant, GUITextureSet> STEAM = steamVariant -> new GUITextureSet() + .setMainBackground(GT_UITextures.BACKGROUND_STEAM.get(steamVariant)) + .setItemSlot(GT_UITextures.SLOT_ITEM_STEAM.get(steamVariant)) + .setFluidSlot(GT_UITextures.SLOT_FLUID_STEAM.get(steamVariant)) + .setCoverTab( + GT_UITextures.TAB_COVER_STEAM_NORMAL.get(steamVariant), + GT_UITextures.TAB_COVER_STEAM_HIGHLIGHT.get(steamVariant), + GT_UITextures.TAB_COVER_STEAM_DISABLED.get(steamVariant)) + .setTitleTab( + GT_UITextures.TAB_TITLE_STEAM.getAdaptable(steamVariant), + GT_UITextures.TAB_TITLE_DARK_STEAM.getAdaptable(steamVariant), + GT_UITextures.TAB_TITLE_ANGULAR_STEAM.getAdaptable(steamVariant)) + .setGregTechLogo(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT_STEAM.get(steamVariant)); public GUITextureSet() {} @@ -99,7 +83,7 @@ public class GUITextureSet { } public GUITextureSet setTitleTab(AdaptableUITexture titleNormal, AdaptableUITexture titleDark, - AdaptableUITexture titleTabAngular) { + AdaptableUITexture titleTabAngular) { this.titleTabNormal = titleNormal; this.titleTabDark = titleDark; this.titleTabAngular = titleTabAngular; diff --git a/src/main/java/gregtech/api/gui/modularui/SteamTexture.java b/src/main/java/gregtech/api/gui/modularui/SteamTexture.java index 7cebd957f2..1d713bc9b8 100644 --- a/src/main/java/gregtech/api/gui/modularui/SteamTexture.java +++ b/src/main/java/gregtech/api/gui/modularui/SteamTexture.java @@ -21,32 +21,20 @@ public class SteamTexture { public static SteamTexture fullImage(String mod, String location) { return new SteamTexture( - UITexture.fullImage(mod, String.format(location, SteamVariant.BRONZE)), - UITexture.fullImage(mod, String.format(location, SteamVariant.STEEL)), - UITexture.fullImage(mod, String.format(location, SteamVariant.PRIMITIVE))); + UITexture.fullImage(mod, String.format(location, SteamVariant.BRONZE)), + UITexture.fullImage(mod, String.format(location, SteamVariant.STEEL)), + UITexture.fullImage(mod, String.format(location, SteamVariant.PRIMITIVE))); } public static SteamTexture adaptableTexture(String mod, String location, int imageWidth, int imageHeight, - int borderWidthPixel) { + int borderWidthPixel) { return new SteamTexture( - AdaptableUITexture.of( - mod, - String.format(location, SteamVariant.BRONZE), - imageWidth, - imageHeight, - borderWidthPixel), - AdaptableUITexture.of( - mod, - String.format(location, SteamVariant.STEEL), - imageWidth, - imageHeight, - borderWidthPixel), - AdaptableUITexture.of( - mod, - String.format(location, SteamVariant.PRIMITIVE), - imageWidth, - imageHeight, - borderWidthPixel)); + AdaptableUITexture + .of(mod, String.format(location, SteamVariant.BRONZE), imageWidth, imageHeight, borderWidthPixel), + AdaptableUITexture + .of(mod, String.format(location, SteamVariant.STEEL), imageWidth, imageHeight, borderWidthPixel), + AdaptableUITexture + .of(mod, String.format(location, SteamVariant.PRIMITIVE), imageWidth, imageHeight, borderWidthPixel)); } public UITexture get(SteamVariant variant) { 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; } |