Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- public class GuiBuying extends GuiScreen {
- public GuiBuying() {
- }
- public void initGui() {
- controlList.clear();
- controlList.add(new GuiButton(0, 135, 60, 70, 20, (new StringBuilder()).append("Red Apple").toString()));
- }
- protected void actionPerformed(GuiButton guibutton, EntityPlayer entityplayer, World world, int i, int j, int k)
- {
- if(guibutton.id == 0)
- {
- if(entityplayer.inventory.consumeInventoryItem(Item.appleRed.shiftedIndex)){
- world.entityJoinedWorld(new EntityItem(world, i, j, k, new ItemStack(Item.appleRed)));
- }
- }
- }
- public boolean doesGuiPauseGame()
- {
- return false;
- }
- public void onGuiClosed()
- {
- }
- public void drawScreen(int i, int j, float f)
- {
- drawDefaultBackground();
- int k = (width - 176) / 2;
- int l = (height - 166) / 2;
- drawCenteredString(fontRenderer, "What do you want?", width / 2, 45, 0xffffff);
- super.drawScreen(i, j, f);
- }
- }
Add Comment
Please, Sign In to add comment