more tinkering with JEI exclusion areas
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ aebuild=7
|
|||||||
aegroup=appeng
|
aegroup=appeng
|
||||||
aebasename=appliedenergistics2
|
aebasename=appliedenergistics2
|
||||||
extended=extended_life
|
extended=extended_life
|
||||||
extendedversion=v0.53.2
|
extendedversion=v0.53.3
|
||||||
#########################################################
|
#########################################################
|
||||||
# Versions #
|
# Versions #
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import appeng.client.me.SlotME;
|
import appeng.client.me.SlotME;
|
||||||
|
import net.minecraftforge.fml.common.Loader;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
@@ -105,6 +106,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
private int currentMouseY = 0;
|
private int currentMouseY = 0;
|
||||||
private boolean delayedUpdate;
|
private boolean delayedUpdate;
|
||||||
|
|
||||||
|
protected int jeiOffset = Loader.isModLoaded( "jei" ) ? 24 : 0;
|
||||||
|
|
||||||
public GuiMEMonitorable( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
public GuiMEMonitorable( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||||
{
|
{
|
||||||
this( inventoryPlayer, te, new ContainerMEMonitorable( inventoryPlayer, 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;
|
final int unusedSpace = this.height - this.ySize;
|
||||||
this.guiTop = (int) Math.floor( unusedSpace / ( unusedSpace < 0 ? 3.8f : 2.0f ) );
|
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
|
if( this.customSortOrder )
|
||||||
.add( this.SortByBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_BY, this.configSrc.getSetting( Settings.SORT_BY ) ) );
|
{
|
||||||
offset += 20;
|
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 )
|
if( this.viewCell || this instanceof GuiWirelessTerm )
|
||||||
@@ -403,7 +408,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
{
|
{
|
||||||
List<Rectangle> exclusionArea = new ArrayList<>();
|
List<Rectangle> 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();
|
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 );
|
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 )
|
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 );
|
exclusionArea.add( viewMode );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,7 +467,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
|
|
||||||
if( this.viewCell || ( this instanceof GuiSecurityStation ) )
|
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++ )
|
for( int x = 0; x < this.rows; x++ )
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ import appeng.me.helpers.ChannelPowerSrc;
|
|||||||
import appeng.util.ConfigManager;
|
import appeng.util.ConfigManager;
|
||||||
import appeng.util.IConfigManagerHost;
|
import appeng.util.IConfigManagerHost;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
import net.minecraftforge.fml.common.Loader;
|
||||||
|
|
||||||
|
|
||||||
public class ContainerMEMonitorable extends AEBaseContainer implements IConfigManagerHost, IConfigurableObject, IMEMonitorHandlerReceiver<IAEItemStack>
|
public class ContainerMEMonitorable extends AEBaseContainer implements IConfigManagerHost, IConfigurableObject, IMEMonitorHandlerReceiver<IAEItemStack>
|
||||||
@@ -88,6 +89,8 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
|||||||
private IConfigManagerHost gui;
|
private IConfigManagerHost gui;
|
||||||
private IConfigManager serverCM;
|
private IConfigManager serverCM;
|
||||||
private IGridNode networkNode;
|
private IGridNode networkNode;
|
||||||
|
protected int jeiOffset = Loader.isModLoaded( "jei" ) ? 24 : 0;
|
||||||
|
|
||||||
|
|
||||||
public ContainerMEMonitorable( final InventoryPlayer ip, final ITerminalHost monitorable )
|
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++ )
|
for( int y = 0; y < 5; y++ )
|
||||||
{
|
{
|
||||||
this.cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEW_CELL, ( (IViewCellStorage) monitorable )
|
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.cellView[y].setAllowEdit( this.canAccessViewCells );
|
||||||
this.addSlotToContainer( this.cellView[y] );
|
this.addSlotToContainer( this.cellView[y] );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user