Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import java.util.List;
- import net.minecraft.client.Minecraft;
- public class GuiTentMenu extends GuiScreen
- {
- public GuiTentMenu()
- {
- updateCounter2 = 0;
- updateCounter = 0;
- }
- public void initGui()
- {
- updateCounter2 = 0;
- controlList.clear();
- controlList.add(new GuiButton(1, width / 2 - 100, height / 4 + 36, "Crafting Bench"));
- if(mc.isMultiplayerWorld())
- {
- ((GuiButton)controlList.get(0)).displayString = "Disconnect";
- }
- controlList.add(new GuiButton(4, width / 2 - 100, height / 4 + 24, "Furnace"));
- controlList.add(new GuiButton(0, width / 2 - 100, height / 4 + 12, "Chest"));
- controlList.add(new GuiButton(1, width / 2 - 100, height / 4 + 12, "Your face"));
- }
- protected void actionPerformed(GuiButton guibutton)
- {
- if(guibutton.id == 0)
- {
- mc.displayGuiScreen(new GuiCrafting(this, mc.gameSettings));
- }
- if(guibutton.id == 4)
- {
- mc.displayGuiScreen(null);
- mc.func_6259_e();
- }
- if(guibutton.id == 1)
- {
- //your face code goes here
- }
- }
- public void updateScreen()
- {
- super.updateScreen();
- updateCounter++;
- }
- public void drawScreen(int i, int j, float f)
- {
- drawDefaultBackground();
- boolean flag = !mc.theWorld.func_650_a(updateCounter2++);
- if(flag || updateCounter < 20)
- {
- float f1 = ((float)(updateCounter % 10) + f) / 10F;
- f1 = MathHelper.sin(f1 * 3.141593F * 2.0F) * 0.2F + 0.8F;
- int k = (int)(255F * f1);
- drawString(fontRenderer, "Saving level..", 8, height - 16, k << 16 | k << 8 | k);
- }
- drawCenteredString(fontRenderer, "Tent Menu", width / 2, 40, 0xffffff);
- super.drawScreen(i, j, f);
- }
- private int updateCounter2;
- private int updateCounter;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement