mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
Co-authored-by: Martin Robertz <[email protected]> Co-authored-by: zyf051520 <[email protected]> Co-authored-by: Caedis <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: iouter <[email protected]>
43 lines
1.5 KiB
Java
43 lines
1.5 KiB
Java
package tconstruct.tools.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 net.minecraft.world.World;
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
import tconstruct.tools.logic.PatternChestLogic;
|
|
|
|
public class PatternChestGui extends GuiContainer {
|
|
|
|
public PatternChestLogic logic;
|
|
|
|
public PatternChestGui(InventoryPlayer inventoryplayer, PatternChestLogic holder, World world, int x, int y,
|
|
int z) {
|
|
super(holder.getGuiContainer(inventoryplayer, world, x, y, z));
|
|
logic = holder;
|
|
xSize = 194;
|
|
ySize = 168;
|
|
}
|
|
|
|
@Override
|
|
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
|
fontRendererObj.drawString(StatCollector.translateToLocal("inventory.PatternChest"), 8, 8, 0x404040);
|
|
fontRendererObj
|
|
.drawString(StatCollector.translateToLocal("container.inventory"), 17, (ySize - 96) + 2, 0x404040);
|
|
}
|
|
|
|
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/patternchest.png");
|
|
|
|
@Override
|
|
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
this.mc.getTextureManager().bindTexture(background);
|
|
int cornerX = (width - xSize) / 2;
|
|
int cornerY = (height - ySize) / 2;
|
|
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
|
}
|
|
}
|