aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/gui/widgets
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2023-01-20 00:30:50 -0800
committerGitHub <noreply@github.com>2023-01-20 09:30:50 +0100
commit7ed516e30ba224b4b8e3fad9c836c22ca00bfcdb (patch)
treebea33f6637b929427e9abbe733e19606f8bf9032 /src/main/java/gregtech/api/gui/widgets
parent750a4070af4756e3708e2b2555b9874864bf3cfb (diff)
downloadGT5-Unofficial-7ed516e30ba224b4b8e3fad9c836c22ca00bfcdb.tar.gz
GT5-Unofficial-7ed516e30ba224b4b8e3fad9c836c22ca00bfcdb.tar.bz2
GT5-Unofficial-7ed516e30ba224b4b8e3fad9c836c22ca00bfcdb.zip
MTE Inventory updates (#1496)
* MTE Inventory updates * Separate Input/Output inventory * Use a LinkedHashMap to ensure inventory orders are deterministic * Input/Output work on either Input/Output inventories * MTE Inventory * Add GT_Packet_MultiTileEntity * More dyanmic packet with packetFeatures * Add IMTE_HasModes for MultiBlockPart * Help with MTE Inventory (#1613) * convert inventory to use ItemStackHandler * Update MUI * inventories * move Iteminventory to its own method Co-authored-by: miozune <miozune@gmail.com> * Update MUI * Update MUI * Add IMultiBlockPart * Mte fluid inventory (#1639) * first work on fluid inventory * make gui work with numbers not dividable by 4 * use math.min * add outputfluids saving * actually working * Update MUI Co-authored-by: miozune <miozune@gmail.com> * Ticking Covers! * Parts now register covers with the controller * Controllers now tick covers on parts * Break cover ticking out into `tickCoverAtSide` Fix some inventory methods on MultiBlockController * Filter on tickable covers * Improve GUIs for MTEs (#1650) * working controller GUI * locked inventory selection work * input and output locking of inventories Co-authored-by: miozune <miozune@gmail.com> * spotless * CoverInfo refactor (#1654) * Add `CoverInfo` and deprecate the old fields to hold cover information * Disable MTE registration * Fix NPE - Return EMPTY_INFO for SIDE_UNKNOWN Temporarily add back old NBT saving in case of a revert so covers aren't lost. * Actually save the old NBT data, instead of empty Co-authored-by: BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> Co-authored-by: miozune <miozune@gmail.com>
Diffstat (limited to 'src/main/java/gregtech/api/gui/widgets')
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java
index 525618589b..d5e383ed50 100644
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java
+++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java
@@ -79,7 +79,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine {
*/
private void setupTabs() {
for (byte tSide = 0; tSide < 6; tSide++) {
- ItemStack cover = tile.getCoverItemAtSide(tSide);
+ final ItemStack cover = tile.getCoverItemAtSide(tSide);
if (cover != null) {
addCoverToTabs(tSide, cover);
}
@@ -114,7 +114,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine {
* @param cover
*/
private void addCoverToTabs(byte side, ItemStack cover) {
- boolean enabled = this.tile.getCoverBehaviorAtSideNew(side).hasCoverGUI();
+ final boolean enabled = this.tile.getCoverBehaviorAtSideNew(side).hasCoverGUI();
this.setTab(side, cover, null, getTooltipForCoverTab(side, cover, enabled));
this.setTabEnabled(side, enabled);
}
@@ -127,7 +127,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine {
* @return This cover tab's tooltip
*/
private String[] getTooltipForCoverTab(byte side, ItemStack cover, boolean enabled) {
- List<String> tooltip = cover.getTooltip(Minecraft.getMinecraft().thePlayer, true);
+ final List<String> tooltip = cover.getTooltip(Minecraft.getMinecraft().thePlayer, true);
tooltip.set(
0,
(enabled ? EnumChatFormatting.UNDERLINE : EnumChatFormatting.DARK_GRAY)
@@ -158,9 +158,9 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine {
static class CoverTabLineNEIHandler extends INEIGuiAdapter {
@Override
public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
- Rectangle neiSlotArea = new Rectangle(x, y, w, h);
+ final Rectangle neiSlotArea = new Rectangle(x, y, w, h);
if (gui instanceof GT_GUIContainerMetaTile_Machine) {
- GT_GuiTabLine tabLine = ((GT_GUIContainerMetaTile_Machine) gui).coverTabs;
+ final GT_GuiTabLine tabLine = ((GT_GUIContainerMetaTile_Machine) gui).coverTabs;
if (!tabLine.visible) {
return false;
}