O3Bubbles09

Untitled

Feb 16th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. package O3Bubbles09.Common;
  2.  
  3. import java.util.EnumSet;
  4.  
  5. import net.minecraft.entity.player.EntityPlayer;
  6. import net.minecraft.item.ItemStack;
  7. import cpw.mods.fml.common.ITickHandler;
  8. import cpw.mods.fml.common.TickType;
  9.  
  10. public class serverTickHandler implements ITickHandler {
  11. O3Bubbles09 bubs;
  12. ItemModPick pick;
  13.  
  14. @Override
  15. public void tickStart(EnumSet<TickType> type, Object... tickData) {
  16. if (type.equals(EnumSet.of(TickType.PLAYER))) {
  17. onPlayerTick((EntityPlayer)tickData[0]);
  18. }
  19. }
  20.  
  21. private void onPlayerTick(EntityPlayer player) {
  22. for(int i=0;i<1000;i+=100) {
  23. ItemStack boots = player.inventory.armorItemInSlot(0);
  24. if(boots.itemID == bubs.copperBoots.itemID) {
  25. System.out.println("ArmorOn");
  26. player.fallDistance = 0.0F;
  27. }
  28. }
  29. }
  30.  
  31. @Override
  32. public void tickEnd(EnumSet<TickType> type, Object... tickData) {
  33. // TODO Auto-generated method stub
  34. }
  35. @Override
  36. public EnumSet<TickType> ticks() {
  37. return EnumSet.of(TickType.PLAYER, TickType.SERVER);
  38. }
  39. @Override
  40. public String getLabel() {
  41. // TODO Auto-generated method stub
  42. return null;
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment