diff --git a/gradle.properties b/gradle.properties index 509c0a94e..84694259d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ aebuild=7 aegroup=appeng aebasename=appliedenergistics2 extended=extended_life -extendedversion=v0.53.2 +extendedversion=v0.53.3 ######################################################### # Versions # ######################################################### diff --git a/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java b/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java index 36a7a6da3..894b58909 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java +++ b/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.List; import appeng.client.me.SlotME; +import net.minecraftforge.fml.common.Loader; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; @@ -105,6 +106,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi private int currentMouseY = 0; private boolean delayedUpdate; + protected int jeiOffset = Loader.isModLoaded( "jei" ) ? 24 : 0; + public GuiMEMonitorable( final InventoryPlayer inventoryPlayer, final ITerminalHost te ) { this( inventoryPlayer, te, new ContainerMEMonitorable( inventoryPlayer, te ) ); @@ -298,13 +301,15 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi final int unusedSpace = this.height - this.ySize; this.guiTop = (int) Math.floor( unusedSpace / ( unusedSpace < 0 ? 3.8f : 2.0f ) ); - int offset = this.guiTop + 8; + int offset = this.guiTop + 8 + jeiOffset; - if( this.customSortOrder ) { - this.buttonList - .add( this.SortByBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_BY, this.configSrc.getSetting( Settings.SORT_BY ) ) ); - offset += 20; + if( this.customSortOrder ) + { + this.buttonList + .add( this.SortByBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_BY, this.configSrc.getSetting( Settings.SORT_BY ) ) ); + offset += 20; + } } if( this.viewCell || this instanceof GuiWirelessTerm ) @@ -403,7 +408,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi { List exclusionArea = new ArrayList<>(); - int yOffset = guiTop + 8; + int yOffset = guiTop + 8 + jeiOffset; int visibleButtons = (int) this.buttonList.stream().filter( v -> v.enabled && v.x < guiLeft ).count(); Rectangle sortDir = new Rectangle( guiLeft - 18, yOffset, 20, visibleButtons * 20 + visibleButtons - 2 ); @@ -411,7 +416,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi if( this.viewCell ) { - Rectangle viewMode = new Rectangle( guiLeft + 205, yOffset, 24, 19 * monitorableContainer.getViewCells().length ); + Rectangle viewMode = new Rectangle( guiLeft + 205, yOffset - 4, 24, 19 * monitorableContainer.getViewCells().length ); exclusionArea.add( viewMode ); } @@ -462,7 +467,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi if( this.viewCell || ( this instanceof GuiSecurityStation ) ) { - this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 ); + this.drawTexturedModalRect( offsetX + x_width, offsetY + jeiOffset, x_width, 0, 46, 128 ); } for( int x = 0; x < this.rows; x++ ) diff --git a/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java b/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java index b38646169..068b3f326 100644 --- a/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java +++ b/src/main/java/appeng/container/implementations/ContainerMEMonitorable.java @@ -71,6 +71,7 @@ import appeng.me.helpers.ChannelPowerSrc; import appeng.util.ConfigManager; import appeng.util.IConfigManagerHost; import appeng.util.Platform; +import net.minecraftforge.fml.common.Loader; public class ContainerMEMonitorable extends AEBaseContainer implements IConfigManagerHost, IConfigurableObject, IMEMonitorHandlerReceiver @@ -88,6 +89,8 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa private IConfigManagerHost gui; private IConfigManager serverCM; private IGridNode networkNode; + protected int jeiOffset = Loader.isModLoaded( "jei" ) ? 24 : 0; + public ContainerMEMonitorable( final InventoryPlayer ip, final ITerminalHost monitorable ) { @@ -167,7 +170,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa for( int y = 0; y < 5; y++ ) { this.cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEW_CELL, ( (IViewCellStorage) monitorable ) - .getViewCellStorage(), y, 206, y * 18 + 8, this.getInventoryPlayer() ); + .getViewCellStorage(), y, 206, y * 18 + 8 + jeiOffset, this.getInventoryPlayer() ); this.cellView[y].setAllowEdit( this.canAccessViewCells ); this.addSlotToContainer( this.cellView[y] ); }