fix jei and tall interface terminal button overlapping
This commit is contained in:
@@ -50,6 +50,7 @@ import net.minecraft.nbt.NBTUtil;
|
|||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.text.TextComponentString;
|
import net.minecraft.util.text.TextComponentString;
|
||||||
import net.minecraftforge.common.DimensionManager;
|
import net.minecraftforge.common.DimensionManager;
|
||||||
|
import net.minecraftforge.fml.common.Loader;
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@@ -75,6 +76,8 @@ public class GuiInterfaceTerminal extends AEBaseGui {
|
|||||||
private final int offsetX = 21;
|
private final int offsetX = 21;
|
||||||
private int maxRows = Integer.MAX_VALUE;
|
private int maxRows = Integer.MAX_VALUE;
|
||||||
|
|
||||||
|
protected int jeiOffset = Loader.isModLoaded("jei") ? 24 : 0;
|
||||||
|
|
||||||
private int reservedSpace = 0;
|
private int reservedSpace = 0;
|
||||||
|
|
||||||
private final HashMap<Long, ClientDCInternalInv> byId = new HashMap<>();
|
private final HashMap<Long, ClientDCInternalInv> byId = new HashMap<>();
|
||||||
@@ -177,9 +180,9 @@ public class GuiInterfaceTerminal extends AEBaseGui {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Rectangle> getJEIExclusionArea() {
|
public List<Rectangle> getJEIExclusionArea() {
|
||||||
Rectangle craftingCPUArea = new Rectangle(this.guiLeft - 18, this.guiTop, 18, 18);
|
Rectangle tallButton = new Rectangle(this.guiLeft - 18, this.guiTop + 24 + jeiOffset, 18, 18);
|
||||||
List<Rectangle> area = new ArrayList<>();
|
List<Rectangle> area = new ArrayList<>();
|
||||||
area.add(craftingCPUArea);
|
area.add(tallButton);
|
||||||
return area;
|
return area;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +198,7 @@ public class GuiInterfaceTerminal extends AEBaseGui {
|
|||||||
guiButtonHide = new GuiImgButton(guiLeft + 141, guiTop + 25, Settings.ACTIONS, this.partInterfaceTerminal.onlyInterfacesWithFreeSlots ? ActionItems.TOGGLE_SHOW_FULL_INTERFACES_OFF : ActionItems.TOGGLE_SHOW_FULL_INTERFACES_ON);
|
guiButtonHide = new GuiImgButton(guiLeft + 141, guiTop + 25, Settings.ACTIONS, this.partInterfaceTerminal.onlyInterfacesWithFreeSlots ? ActionItems.TOGGLE_SHOW_FULL_INTERFACES_OFF : ActionItems.TOGGLE_SHOW_FULL_INTERFACES_ON);
|
||||||
this.buttonList.add(guiButtonHide);
|
this.buttonList.add(guiButtonHide);
|
||||||
|
|
||||||
this.buttonList.add(this.terminalStyleBox = new GuiImgButton(this.guiLeft - 18, guiTop + 18, Settings.TERMINAL_STYLE, AEConfig.instance()
|
this.buttonList.add(this.terminalStyleBox = new GuiImgButton(this.guiLeft - 18, guiTop + 24 + jeiOffset, Settings.TERMINAL_STYLE, AEConfig.instance()
|
||||||
.getConfigManager()
|
.getConfigManager()
|
||||||
.getSetting(Settings.TERMINAL_STYLE)));
|
.getSetting(Settings.TERMINAL_STYLE)));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user