Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CelestialDimListener
- {
- private int celestialAtmosphere = 0;
- @SubscribeEvent
- public void onEntityUpdate(LivingUpdateEvent event)
- {
- if(!event.entityLiving.worldObj.isRemote)
- {
- if(event.entity instanceof EntityPlayer && CelCloth_Protection.checkArmor((EntityPlayer)event.entityLiving) == true)
- {
- if (event.entityLiving.dimension == DimensionIDs.LIGHTFORESTDIMENSION)
- {
- celestialAtmosphere += 1;
- if(celestialAtmosphere == 140)
- {
- ((EntityPlayer) event.entityLiving).addChatComponentMessage(new ChatComponentTranslation ("\u00A74The Celestial Atmosphere is sucking away your lifeforce!"));
- event.entityLiving.attackEntityFrom(DamageSource.generic, 8);
- celestialAtmosphere = 0;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment