Guest User

Untitled

a guest
Jan 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. public class GuiBuying extends GuiScreen {
  4.  
  5. public GuiBuying() {
  6. }
  7.  
  8. public void initGui() {
  9. controlList.clear();
  10. controlList.add(new GuiButton(0, 135, 60, 70, 20, (new StringBuilder()).append("Red Apple").toString()));
  11. }
  12. protected void actionPerformed(GuiButton guibutton, EntityPlayer entityplayer, World world, int i, int j, int k)
  13. {
  14. if(guibutton.id == 0)
  15.  
  16. {
  17. if(entityplayer.inventory.consumeInventoryItem(Item.appleRed.shiftedIndex)){
  18. world.entityJoinedWorld(new EntityItem(world, i, j, k, new ItemStack(Item.appleRed)));
  19. }
  20. }
  21. }
  22. public boolean doesGuiPauseGame()
  23. {
  24. return false;
  25. }
  26. public void onGuiClosed()
  27. {
  28. }
  29. public void drawScreen(int i, int j, float f)
  30. {
  31. drawDefaultBackground();
  32. int k = (width - 176) / 2;
  33. int l = (height - 166) / 2;
  34. drawCenteredString(fontRenderer, "What do you want?", width / 2, 45, 0xffffff);
  35. super.drawScreen(i, j, f);
  36. }
  37. }
Add Comment
Please, Sign In to add comment