O3Bubbles09

Untitled

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