equivalent-exchange-3/src/main/java/com/pahimar/ee3/client/gui/inventory/GuiGlassBell.java

42 lines
1.4 KiB
Java
Raw Normal View History

2014-04-30 03:46:59 +02:00
package com.pahimar.ee3.client.gui.inventory;
import com.pahimar.ee3.inventory.ContainerGlassBell;
import com.pahimar.ee3.reference.Textures;
import com.pahimar.ee3.tileentity.TileEntityGlassBell;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
2023-01-03 17:47:36 +01:00
public class GuiGlassBell extends GuiContainer {
2014-04-30 03:46:59 +02:00
private TileEntityGlassBell tileEntityGlassBell;
2023-01-03 17:47:36 +01:00
public GuiGlassBell(
InventoryPlayer inventoryPlayer, TileEntityGlassBell tileEntityGlassBell
) {
2014-04-30 03:46:59 +02:00
super(new ContainerGlassBell(inventoryPlayer, tileEntityGlassBell));
this.tileEntityGlassBell = tileEntityGlassBell;
xSize = 176;
2014-09-23 20:58:43 +02:00
ySize = 161;
2014-04-30 03:46:59 +02:00
}
@Override
2023-01-03 17:47:36 +01:00
protected void drawGuiContainerForegroundLayer(int x, int y) {
2014-09-23 20:58:43 +02:00
// NOOP
2014-04-30 03:46:59 +02:00
}
@Override
2023-01-03 17:47:36 +01:00
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
2014-09-23 20:58:43 +02:00
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
2014-04-30 03:46:59 +02:00
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(Textures.Gui.GLASS_BELL);
2014-04-30 03:46:59 +02:00
int xStart = (width - xSize) / 2;
int yStart = (height - ySize) / 2;
this.drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize);
2014-09-23 20:58:43 +02:00
GL11.glDisable(GL11.GL_BLEND);
2014-04-30 03:46:59 +02:00
}
}