use of nex.entity.neutral.EntityMogus in project NetherEx by LogicTechCorp.
the class EventHandler method onSetAttackTarget.
@SubscribeEvent
public static void onSetAttackTarget(LivingSetAttackTargetEvent event) {
EntityLivingBase attacker = (EntityLivingBase) event.getEntity();
EntityLivingBase attackee = event.getTarget();
if (attackee instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) attackee;
if (attacker instanceof AbstractSkeleton) {
if (ArmorUtil.isWearingFullArmorSet(player, NetherExMaterials.ARMOR_BONE_WITHERED)) {
((AbstractSkeleton) attacker).setAttackTarget(null);
player.addStat(NetherExAchievements.IN_PLAIN_SIGHT);
}
}
if (attacker instanceof EntityPigZombie) {
player.addStat(NetherExAchievements.UH_OH);
}
if (attacker instanceof EntityMogus) {
player.addStat(NetherExAchievements.CUTE_BUT_DEADLY);
}
}
}
Aggregations