mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 00:47:32 +00:00
40 lines
1.3 KiB
Java
40 lines
1.3 KiB
Java
package tconstruct.client.gui;
|
|
|
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
|
import net.minecraft.entity.player.InventoryPlayer;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import net.minecraft.util.StatCollector;
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
import tconstruct.entity.MiniGardy;
|
|
import tconstruct.inventory.MiniGardyContainer;
|
|
|
|
public class MiniGardyGui extends GuiContainer
|
|
{
|
|
public MiniGardy gardy;
|
|
|
|
public MiniGardyGui(InventoryPlayer inventoryplayer, MiniGardy gardy)
|
|
{
|
|
super(new MiniGardyContainer(inventoryplayer, gardy));
|
|
this.gardy = gardy;
|
|
}
|
|
|
|
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
|
{
|
|
fontRenderer.drawString(gardy.getEntityName(), 8, 6, 0x404040);
|
|
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 4, 0x404040);
|
|
}
|
|
|
|
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/googirl.png");
|
|
|
|
protected void drawGuiContainerBackgroundLayer (float f, int i, int j)
|
|
{
|
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
this.mc.func_110434_K().func_110577_a(background);
|
|
int cornerX = (width - xSize) / 2;
|
|
int cornerY = (height - ySize) / 2;
|
|
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
|
}
|
|
}
|