Advertisement
Guest User

Untitled

a guest
Dec 11th, 2015
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. public class WorldTickEvents {
  2.     int gameTick = 0;
  3.     @SubscribeEvent
  4.     public void onWorldUpdate(TickEvent.WorldTickEvent e)
  5.     {
  6.         gameTick++;
  7.         for(EntityPlayer player : e.world.playerEntities)
  8.         {
  9.             if(gameTick > 100)
  10.             {
  11.                 if(((PlayerPlaceSatanicAltarIEEP)player.getExtendedProperties(PlayerPlaceSatanicAltarIEEP.EXT_PROP_NAME)).getAltarCooldown() > 0)
  12.                 {
  13.                     int cooldown = ((PlayerPlaceSatanicAltarIEEP)player.getExtendedProperties(PlayerPlaceSatanicAltarIEEP.EXT_PROP_NAME)).getAltarCooldown();
  14.                     ((PlayerPlaceSatanicAltarIEEP)player.getExtendedProperties(PlayerPlaceSatanicAltarIEEP.EXT_PROP_NAME)).setAltarCooldown(cooldown - 1);
  15.                 }
  16.                 gameTick = 0;
  17.             }
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement