2022-10-26 19:42:44 +02:00
|
|
|
package assemblyline.client.gui;
|
|
|
|
|
|
|
|
import assemblyline.common.machine.imprinter.ContainerImprinter;
|
|
|
|
import assemblyline.common.machine.imprinter.TileEntityImprinter;
|
|
|
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
|
|
|
import net.minecraft.entity.player.InventoryPlayer;
|
|
|
|
import net.minecraft.inventory.Container;
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
import universalelectricity.prefab.TranslationHelper;
|
|
|
|
|
2023-02-10 17:51:10 +01:00
|
|
|
public class GuiImprinter extends GuiContainer {
|
2022-10-26 19:42:44 +02:00
|
|
|
private int containerWidth;
|
|
|
|
private int containerHeight;
|
|
|
|
private TileEntityImprinter tileEntity;
|
|
|
|
|
2023-02-10 17:51:10 +01:00
|
|
|
public GuiImprinter(
|
|
|
|
InventoryPlayer par1InventoryPlayer, TileEntityImprinter tileEntity
|
|
|
|
) {
|
|
|
|
super((Container) new ContainerImprinter(par1InventoryPlayer, tileEntity));
|
2022-10-26 19:42:44 +02:00
|
|
|
this.tileEntity = tileEntity;
|
|
|
|
this.ySize = 201;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
|
|
|
this.fontRendererObj.drawString("Use Inventories:", 70, 58, 0x404040);
|
2023-02-10 17:51:10 +01:00
|
|
|
this.fontRendererObj.drawString(
|
|
|
|
"" + this.tileEntity.searchInventories, 105, 67, 0x404040
|
|
|
|
);
|
|
|
|
this.fontRendererObj.drawString(
|
|
|
|
TranslationHelper.getLocal("tile.imprinter.name"), 68, 6, 0x404040
|
|
|
|
);
|
2022-10-26 19:42:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
2023-02-10 17:51:10 +01:00
|
|
|
this.mc.renderEngine.bindTexture(
|
|
|
|
new ResourceLocation("assemblyline", "textures/gui/gui_imprinter.png")
|
|
|
|
);
|
|
|
|
GL11.glColor4f((float) 1.0f, (float) 1.0f, (float) 1.0f, (float) 1.0f);
|
2022-10-26 19:42:44 +02:00
|
|
|
this.containerWidth = (this.width - this.xSize) / 2;
|
|
|
|
this.containerHeight = (this.height - this.ySize) / 2;
|
2023-02-10 17:51:10 +01:00
|
|
|
this.drawTexturedModalRect(
|
|
|
|
this.containerWidth, this.containerHeight, 0, 0, this.xSize, this.ySize
|
|
|
|
);
|
2022-10-26 19:42:44 +02:00
|
|
|
}
|
|
|
|
}
|