Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.lwjgl.opengl.GL11;
- import com.khufu.stonetitans.config.Preferences;
- import com.khufu.stonetitans.entity.EntityClone;
- import com.khufu.stonetitans.gui.container.ContainerClone;
- import com.khufu.stonetitans.inventory.InventoryClone;
- import net.minecraft.client.gui.inventory.GuiContainer;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.util.ResourceLocation;
- public class GuiClone extends GuiContainer {
- private static final ResourceLocation texture = new ResourceLocation(Preferences.modid, "textures/gui/clone_gui.png");
- /** window height is calculated with these values; the more rows, the heigher */
- private int inventoryRows = 3;
- int xSize = 198;
- int ySize = 182;
- public GuiClone(InventoryPlayer inventory, InventoryClone c_inventory, EntityPlayer thePlayer, EntityClone theClone) {
- super(new ContainerClone(inventory, c_inventory, thePlayer, theClone));
- }
- @Override
- public void initGui() {
- super.initGui();
- this.mc.thePlayer.openContainer = this.inventorySlots;
- this.guiLeft = (this.width - this.xSize) / 2;
- this.guiTop = (this.height - this.ySize) / 2;
- }
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- }
- @Override
- protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- 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, 182);
- drawVerticalLine(this.guiLeft, this.guiTop + this.ySize, this.guiTop, -6396534);
- drawVerticalLine(this.guiLeft + this.xSize, this.guiTop + this.ySize, this.guiTop, -6396534);
- drawHorizontalLine(this.guiLeft, this.guiLeft + this.xSize, this.guiTop, -6396534);
- drawHorizontalLine(this.guiLeft, this.guiLeft + this.xSize, this.guiTop + this.ySize, -6396534);
- }
- // GUI SIZE 197 x 182
- // default 176x166
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement