Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.ButterAleks.RandomIdeas.blocks.gui;
- import com.ButterAleks.RandomIdeas.blocks.container.ContainerRainbowChestBlock;
- import com.ButterAleks.RandomIdeas.blocks.tileentity.TileEntityRainbowChestBlock;
- import com.ButterAleks.RandomIdeas.util.Reference;
- import net.minecraft.client.gui.inventory.GuiContainer;
- import net.minecraft.client.renderer.GlStateManager;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.inventory.Container;
- import net.minecraft.util.ResourceLocation;
- public class GuiRainbowChestBlock extends GuiContainer
- {
- public GuiRainbowChestBlock(InventoryPlayer playerInventory, TileEntityRainbowChestBlock chestInventory, EntityPlayer player)
- {
- super(new ContainerRainbowChestBlock(playerInventory, chestInventory, player));
- this.playerInventory = playerInventory;
- this.te = chestInventory;
- this.xSize = 179;
- this.ySize = 256;
- }
- private static final ResourceLocation GUI_CHEST = new ResourceLocation(Reference.MOD_ID + ":textures/gui/rainbow_chest_block.png");
- private final InventoryPlayer playerInventory;
- private final TileEntityRainbowChestBlock te;
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
- {
- this.fontRenderer.drawString(this.te.getDisplayName().getUnformattedText(), 8, 6, 65793);
- this.fontRenderer.drawString(this.playerInventory.getDisplayName().getUnformattedText(), 8, this.ySize - 92, 65793);
- }
- @Override
- protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
- {
- GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
- this.mc.getTextureManager().bindTexture(GUI_CHEST);
- this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement