Advertisement
Corosus

Untitled

Mar 21st, 2011
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. import java.util.List;
  4. import net.minecraft.client.Minecraft;
  5.  
  6. public class GuiTentMenu extends GuiScreen
  7. {
  8.  
  9. public GuiTentMenu()
  10. {
  11. updateCounter2 = 0;
  12. updateCounter = 0;
  13. }
  14.  
  15. public void initGui()
  16. {
  17. updateCounter2 = 0;
  18. controlList.clear();
  19. controlList.add(new GuiButton(1, width / 2 - 100, height / 4 + 36, "Crafting Bench"));
  20. if(mc.isMultiplayerWorld())
  21. {
  22. ((GuiButton)controlList.get(0)).displayString = "Disconnect";
  23. }
  24. controlList.add(new GuiButton(4, width / 2 - 100, height / 4 + 24, "Furnace"));
  25. controlList.add(new GuiButton(0, width / 2 - 100, height / 4 + 12, "Chest"));
  26. controlList.add(new GuiButton(1, width / 2 - 100, height / 4 + 12, "Your face"));
  27. }
  28.  
  29. protected void actionPerformed(GuiButton guibutton)
  30. {
  31. if(guibutton.id == 0)
  32. {
  33. mc.displayGuiScreen(new GuiCrafting(this, mc.gameSettings));
  34. }
  35.  
  36. if(guibutton.id == 4)
  37. {
  38. mc.displayGuiScreen(null);
  39. mc.func_6259_e();
  40. }
  41. if(guibutton.id == 2)
  42. {
  43. //your face code goes here
  44. }
  45. }
  46.  
  47. public void updateScreen()
  48. {
  49. super.updateScreen();
  50. updateCounter++;
  51. }
  52.  
  53. public void drawScreen(int i, int j, float f)
  54. {
  55. drawDefaultBackground();
  56. boolean flag = !mc.theWorld.func_650_a(updateCounter2++);
  57. if(flag || updateCounter < 20)
  58. {
  59. float f1 = ((float)(updateCounter % 10) + f) / 10F;
  60. f1 = MathHelper.sin(f1 * 3.141593F * 2.0F) * 0.2F + 0.8F;
  61. int k = (int)(255F * f1);
  62. drawString(fontRenderer, "Saving level..", 8, height - 16, k << 16 | k << 8 | k);
  63. }
  64. drawCenteredString(fontRenderer, "Tent Menu", width / 2, 40, 0xffffff);
  65. super.drawScreen(i, j, f);
  66. }
  67.  
  68. private int updateCounter2;
  69. private int updateCounter;
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement