ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java
2016-06-17 23:50:39 +02:00

52 lines
2 KiB
Java

/*
* This file ("GuiGiantChest.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2016 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.inventory.gui;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerGiantChest;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiGiantChest extends GuiContainer{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiGiantChest");
final TileEntityGiantChest chest;
public GuiGiantChest(InventoryPlayer inventory, TileEntityBase tile){
super(new ContainerGiantChest(inventory, tile));
this.chest = (TileEntityGiantChest)tile;
this.xSize = 242;
this.ySize = 172+86;
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.chest.getName());
}
@Override
public void drawGuiContainerBackgroundLayer(float f, int x, int y){
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 242, 190);
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft+33, this.guiTop+172, 0, 0, 176, 86);
}
}