Guest User

Untitled

a guest
Aug 29th, 2015
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1. public class CelestialDimListener
  2. {
  3.     private int celestialAtmosphere = 0;
  4.  
  5.     @SubscribeEvent
  6.     public void onEntityUpdate(LivingUpdateEvent event)
  7.     {
  8.         if(!event.entityLiving.worldObj.isRemote)
  9.         {
  10.             if(event.entity instanceof EntityPlayer && CelCloth_Protection.checkArmor((EntityPlayer)event.entityLiving) == true)
  11.             {
  12.                 if (event.entityLiving.dimension == DimensionIDs.LIGHTFORESTDIMENSION)
  13.                 {
  14.                     celestialAtmosphere += 1;
  15.                     if(celestialAtmosphere == 140)
  16.                     {
  17.                     ((EntityPlayer) event.entityLiving).addChatComponentMessage(new ChatComponentTranslation ("\u00A74The Celestial Atmosphere is sucking away your lifeforce!"));
  18.                     event.entityLiving.attackEntityFrom(DamageSource.generic, 8);
  19.                     celestialAtmosphere = 0;
  20.                     }
  21.                 }
  22.             }
  23.  
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment