public CraftCreeper(CraftServer server, EntityCreeper entity) { super(server, entity); }
@Override public EntityCreeper getHandle() { return (EntityCreeper) entity; }
/** * If an entity is not in range, do some more checks to see if we should * give it a shot. * * @param entity * @return */ public static boolean checkEntityImmunities(Entity entity) { // quick checks. if ( entity.inWater || entity.fireTicks > 0 ) { return true; } if ( !( entity instanceof EntityArrow ) ) { if ( !entity.onGround || !entity.passengers.isEmpty() || entity.isPassenger() ) { return true; } } else if ( !( (EntityArrow) entity ).inGround ) { return true; } // special cases. if ( entity instanceof EntityLiving ) { EntityLiving living = (EntityLiving) entity; if ( /*TODO: Missed mapping? living.attackTicks > 0 || */ living.hurtTicks > 0 || living.effects.size() > 0 ) { return true; } if ( entity instanceof EntityCreature && ( (EntityCreature) entity ).getGoalTarget() != null ) { return true; } if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).db()/* Getter for first boolean */ ) { return true; } if ( entity instanceof EntityAnimal ) { EntityAnimal animal = (EntityAnimal) entity; if ( animal.isBaby() || animal.isInLove() ) { return true; } if ( entity instanceof EntitySheep && ( (EntitySheep) entity ).isSheared() ) { return true; } } if (entity instanceof EntityCreeper && ((EntityCreeper) entity).isIgnited()) { // isExplosive return true; } } return false; }