Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package melonslise.runicinscription.client.gui;
- import org.lwjgl.opengl.GL11;
- import melonslise.runicinscription.RunicInscription;
- import melonslise.runicinscription.common.container.ContainerRuneInscription;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.gui.inventory.GuiContainer;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.inventory.Container;
- import net.minecraft.util.ResourceLocation;
- import net.minecraft.world.World;
- public class GUIRuneInscription extends GuiContainer
- {
- private ResourceLocation texture = new ResourceLocation(RunicInscription.ID + ":" + "textures/gui/RuneInscription.png");
- private ResourceLocation slot = new ResourceLocation(RunicInscription.ID + ":" + "textures/gui/CarvingGridSlot.png");
- private ResourceLocation slotCarved = new ResourceLocation(RunicInscription.ID + ":" + "textures/gui/CarvingGridSlotCarved.png");
- private boolean[][] grid = new boolean[5][7];
- public GUIRuneInscription(InventoryPlayer inventoryPlayer, World world, int x, int y, int z)
- {
- super(new ContainerRuneInscription(inventoryPlayer, world, x, y, z));
- this.xSize = 176;
- this.ySize = 206;
- }
- public void renderCarvingGrid()
- {
- for(int i = 0; i < 7; ++i)
- {
- for(int k = 0; k < 5; ++k)
- {
- GL11.glColor4f(1F, 1F, 1F, 1F);
- if (grid[k][i] == false)
- {
- mc.getTextureManager().bindTexture(slot);
- }
- else if (grid[k][i] == true)
- {
- mc.getTextureManager().bindTexture(slotCarved);
- }
- drawTexturedModalRect(guiLeft + 43 + k * 16, guiTop + 6 + i * 16, 0, 0, 16, 16);
- }
- }
- }
- public void mouseClicked()
- {
- }
- public void onGuiClosed()
- {
- super.onGuiClosed();
- }
- protected void drawGuiContainerForegroundLayer(int i, int j)
- {
- //Draw text
- }
- @Override
- protected void drawGuiContainerBackgroundLayer(float f1, int i1, int i2)
- {
- GL11.glColor4f(1F, 1F, 1F, 1F);
- Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
- drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
- renderCarvingGrid();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement