O3Bubbles09

Untitled

Feb 16th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 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<100;i++) {
  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. if(player.inventory.hasItem(bubs.copperPick.itemID)) {
  30. player.fallDistance = 0.0F;
  31. }
  32. }
  33. }
  34.  
  35. @Override
  36. public void tickEnd(EnumSet<TickType> type, Object... tickData) {
  37. // TODO Auto-generated method stub
  38. }
  39. @Override
  40. public EnumSet<TickType> ticks() {
  41. return EnumSet.of(TickType.PLAYER, TickType.SERVER);
  42. }
  43. @Override
  44. public String getLabel() {
  45. // TODO Auto-generated method stub
  46. return null;
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment