fix JEI stuff going over GUIs
This commit is contained in:
@@ -25,17 +25,27 @@ public abstract class GuiBase extends GuiContainer
|
||||
private int lastButtonId = 0;
|
||||
private int lastSideButtonY = 6;
|
||||
|
||||
public GuiBase(Container container, int w, int h)
|
||||
protected int width;
|
||||
protected int height;
|
||||
|
||||
public GuiBase(Container container, int width, int height)
|
||||
{
|
||||
super(container);
|
||||
|
||||
this.xSize = w;
|
||||
this.ySize = h;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.xSize = width;
|
||||
this.ySize = height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
if (sideButtons.size() > 0)
|
||||
{
|
||||
xSize -= SIDE_BUTTON_WIDTH;
|
||||
}
|
||||
|
||||
super.initGui();
|
||||
|
||||
sideButtons.clear();
|
||||
@@ -44,6 +54,11 @@ public abstract class GuiBase extends GuiContainer
|
||||
lastSideButtonY = 6;
|
||||
|
||||
init(guiLeft, guiTop);
|
||||
|
||||
if (sideButtons.size() > 0)
|
||||
{
|
||||
xSize += SIDE_BUTTON_WIDTH;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,7 +36,7 @@ public class GuiConstructor extends GuiBase
|
||||
{
|
||||
bindTexture("gui/constructor.png");
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,7 +36,7 @@ public class GuiController extends GuiBase
|
||||
{
|
||||
bindTexture("gui/controller.png");
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
|
||||
int barHeightNew = (int) ((float) controller.getEnergyStored(null) / (float) controller.getMaxEnergyStored(null) * (float) barHeight);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class GuiDestructor extends GuiBase
|
||||
{
|
||||
bindTexture("gui/destructor.png");
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -51,7 +51,7 @@ public class GuiDetector extends GuiBase
|
||||
{
|
||||
bindTexture("gui/detector.png");
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
|
||||
amountField.drawTextBox();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class GuiDrive extends GuiBase
|
||||
{
|
||||
bindTexture("gui/drive.png");
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,7 +36,7 @@ public class GuiExporter extends GuiBase
|
||||
{
|
||||
bindTexture("gui/exporter.png");
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -138,7 +138,7 @@ public class GuiGrid extends GuiBase
|
||||
bindTexture("gui/grid.png");
|
||||
}
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
|
||||
searchField.drawTextBox();
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package storagecraft.gui;
|
||||
|
||||
import storagecraft.container.ContainerImporter;
|
||||
import storagecraft.gui.sidebutton.SideButtonCompare;
|
||||
import storagecraft.gui.sidebutton.SideButtonRedstoneMode;
|
||||
import storagecraft.gui.sidebutton.SideButtonMode;
|
||||
import storagecraft.gui.sidebutton.SideButtonRedstoneMode;
|
||||
import storagecraft.tile.TileImporter;
|
||||
import storagecraft.util.InventoryUtils;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class GuiImporter extends GuiBase
|
||||
{
|
||||
bindTexture("gui/importer.png");
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,7 +31,7 @@ public class GuiSolderer extends GuiBase
|
||||
{
|
||||
bindTexture("gui/solderer.png");
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
|
||||
if (solderer.isWorking())
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@ import java.io.IOException;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import storagecraft.container.ContainerStorage;
|
||||
import storagecraft.gui.sidebutton.SideButtonCompare;
|
||||
import storagecraft.gui.sidebutton.SideButtonRedstoneMode;
|
||||
import storagecraft.gui.sidebutton.SideButtonMode;
|
||||
import storagecraft.gui.sidebutton.SideButtonRedstoneMode;
|
||||
import storagecraft.storage.IStorageGui;
|
||||
import storagecraft.util.InventoryUtils;
|
||||
|
||||
@@ -66,7 +66,7 @@ public class GuiStorage extends GuiBase
|
||||
{
|
||||
bindTexture("gui/storage.png");
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
|
||||
int barHeightNew = (int) ((float) gui.getStored() / (float) gui.getCapacity() * (float) barHeight);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class GuiWirelessTransmitter extends GuiBase
|
||||
{
|
||||
bindTexture("gui/wireless_transmitter.png");
|
||||
|
||||
drawTexture(x, y, 0, 0, xSize, ySize);
|
||||
drawTexture(x, y, 0, 0, width, height);
|
||||
|
||||
if (wirelessTransmitter.isWorking())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user