2015-04-28 18:58:01 +02:00
|
|
|
package techreborn.client.gui;
|
|
|
|
|
|
|
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
2015-04-28 19:05:47 +02:00
|
|
|
import net.minecraft.client.resources.I18n;
|
2015-04-28 18:58:01 +02:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2015-04-28 19:05:47 +02:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2015-04-29 14:34:08 +02:00
|
|
|
import net.minecraft.util.StatCollector;
|
2015-05-20 00:00:36 +02:00
|
|
|
import techreborn.client.container.ContainerGrinder;
|
|
|
|
import techreborn.tiles.TileGrinder;
|
2015-04-28 18:58:01 +02:00
|
|
|
|
|
|
|
public class GuiGrinder extends GuiContainer{
|
2015-04-28 19:05:47 +02:00
|
|
|
|
|
|
|
private static final ResourceLocation texture = new ResourceLocation(
|
|
|
|
"techreborn", "textures/gui/industrial_grinder.png");
|
2015-04-28 18:58:01 +02:00
|
|
|
|
2015-04-28 19:05:47 +02:00
|
|
|
TileGrinder grinder;
|
2015-04-28 18:58:01 +02:00
|
|
|
|
|
|
|
public GuiGrinder(EntityPlayer player, TileGrinder tilegrinder)
|
|
|
|
{
|
|
|
|
super(new ContainerGrinder(tilegrinder, player));
|
2015-04-28 19:05:47 +02:00
|
|
|
this.xSize = 176;
|
|
|
|
this.ySize = 167;
|
|
|
|
grinder = tilegrinder;
|
2015-04-28 18:58:01 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
|
|
|
|
int p_146976_2_, int p_146976_3_)
|
|
|
|
{
|
2015-04-28 19:05:47 +02:00
|
|
|
this.mc.getTextureManager().bindTexture(texture);
|
|
|
|
int k = (this.width - this.xSize) / 2;
|
|
|
|
int l = (this.height - this.ySize) / 2;
|
|
|
|
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void drawGuiContainerForegroundLayer(int p_146979_1_,
|
|
|
|
int p_146979_2_)
|
|
|
|
{
|
2015-05-10 22:39:19 +02:00
|
|
|
String name = StatCollector.translateToLocal("tile.techreborn.grinder.name");
|
|
|
|
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
2015-04-28 19:05:47 +02:00
|
|
|
this.fontRendererObj.drawString(
|
|
|
|
I18n.format("container.inventory", new Object[0]), 8,
|
|
|
|
this.ySize - 96 + 2, 4210752);
|
2015-04-28 18:58:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|