Advertisement
Olivki

AutoSoup

Dec 30th, 2012
604
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1. package se.proxus.mods.list;
  2.  
  3. import org.lwjgl.opengl.GL11;
  4.  
  5. import net.minecraft.client.Minecraft;
  6. import net.minecraft.src.*;
  7. import se.proxus.mods.*;
  8.  
  9. public class ModAutoSoup extends BaseMod {
  10.  
  11.     public ModAutoSoup() {
  12.         super('f', "Auto_Soup", "Automagically selects soup and stuff.", "Combat", "NONE", true, false, "Oliver");
  13.     }
  14.  
  15.     @Override
  16.     public void onEnabled() {
  17.  
  18.     }
  19.  
  20.     @Override
  21.     public void onDisabled() {
  22.  
  23.     }
  24.  
  25.     @Override
  26.     public void onUpdate() {
  27.         if(this.getState()) {
  28.             if(this.wrapper.getPlayer().getHealth() <= 14) {
  29.                 this.setCurrentItemSoup();
  30.             }
  31.         }
  32.     }
  33.  
  34.     public void setCurrentItemSoup() { 
  35.         for(int var0 = 0; var0 < 9; var0++) {
  36.             ItemStack var1 = this.wrapper.getPlayer().inventory.mainInventory[var0];
  37.  
  38.             if(var1 != null) {
  39.                 if(var1.getItem() == Item.bowlSoup) {
  40.                     this.wrapper.getPlayer().inventory.currentItem = var0;
  41.                     this.utils.sendPacket(new Packet15Place(-1, -1, -1, -1, this.wrapper.getPlayer().inventory.getCurrentItem(), 0.0F, 0.0F, 0.0F));
  42.                 }
  43.             } else {
  44.                 this.dragSoupFromInventory();
  45.             }
  46.         }
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement