// Path: src/main/java/com/github/dayzminecraft/dayzminecraft/common/effects/Effect.java
// public class Effect extends Potion {
//   public static Effect bleeding;
//   public static int bleedingId;
//   public static Effect zombification;
//   public static int zombificationId;
// 
//   public Effect(int id, boolean isBadEffect, int color, String name) {
//     super(new ResourceLocation(name), isBadEffect, color);
//     setPotionName("potion." + name);
//   }
// 
//   public static void loadEffects() {
//     bleeding = new Effect(bleedingId, true, 5149489, "Bleeding");
//     zombification = new Effect(zombificationId, true, 5149489, "Zombification");
//   }
// 
//   @Override
//   public Potion setIconIndex(int x, int y) {
//     super.setIconIndex(x, y);
//     return this;
//   }
// }
// 
// Path: src/main/java/com/github/dayzminecraft/dayzminecraft/common/effects/EnactEffect.java
// public class EnactEffect extends PotionEffect {
//   public EnactEffect(int potionID, int duration, int amplifier) {
//     super(potionID, duration, amplifier);
//   }
// }


import com.github.dayzminecraft.dayzminecraft.common.effects.Effect;
import com.github.dayzminecraft.dayzminecraft.common.effects.EnactEffect;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.ai.*;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.pathfinding.PathNavigateGround;
import net.minecraft.util.BlockPos;
import net.minecraft.util.DamageSource;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.World;
      if (riddenByEntity == entity || ridingEntity == entity) {
        return true;
      }

      if (entity != this && entity instanceof EntityLivingBase) {
        setAttackTarget((EntityLivingBase) entity);
      }

      return true;
    } else {
      return false;
    }
  }

  @Override
  public boolean attackEntityAsMob(Entity entity) {
    if (worldObj.getDifficulty().equals(EnumDifficulty.EASY)) {
      int j = rand.nextInt(10);
      int k = rand.nextInt(20);
      if (j == 0) {
        ((EntityLivingBase) entity).addPotionEffect(new EnactEffect(Effect.bleeding.getId(), 20 * 300, 1));
      }
      if (k == 0) {
        ((EntityLivingBase) entity).addPotionEffect(new EnactEffect(Effect.zombification.getId(), 20 * 300, 1));
      }
      return entity.attackEntityFrom(DamageSource.causeMobDamage(this), 1);
    } else if (worldObj.getDifficulty().equals(EnumDifficulty.NORMAL)) {
      int j = rand.nextInt(5);
      int k = rand.nextInt(10);
      if (j == 0) {
// Path: src/main/java/com/github/dayzminecraft/dayzminecraft/common/effects/Effect.java
// public class Effect extends Potion {
//   public static Effect bleeding;
//   public static int bleedingId;
//   public static Effect zombification;
//   public static int zombificationId;
// 
//   public Effect(int id, boolean isBadEffect, int color, String name) {
//     super(new ResourceLocation(name), isBadEffect, color);
//     setPotionName("potion." + name);
//   }
// 
//   public static void loadEffects() {
//     bleeding = new Effect(bleedingId, true, 5149489, "Bleeding");
//     zombification = new Effect(zombificationId, true, 5149489, "Zombification");
//   }
// 
//   @Override
//   public Potion setIconIndex(int x, int y) {
//     super.setIconIndex(x, y);
//     return this;
//   }
// }
// 
// Path: src/main/java/com/github/dayzminecraft/dayzminecraft/common/effects/EnactEffect.java
// public class EnactEffect extends PotionEffect {
//   public EnactEffect(int potionID, int duration, int amplifier) {
//     super(potionID, duration, amplifier);
//   }
// }


// Path: src/main/java/com/github/dayzminecraft/dayzminecraft/common/entities/EntityCrawler.java
import com.github.dayzminecraft.dayzminecraft.common.effects.Effect;
import com.github.dayzminecraft.dayzminecraft.common.effects.EnactEffect;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.ai.*;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.pathfinding.PathNavigateGround;
import net.minecraft.util.BlockPos;
import net.minecraft.util.DamageSource;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.World;

      if (riddenByEntity == entity || ridingEntity == entity) {
        return true;
      }

      if (entity != this && entity instanceof EntityLivingBase) {
        setAttackTarget((EntityLivingBase) entity);
      }

      return true;
    } else {
      return false;
    }
  }

  @Override
  public boolean attackEntityAsMob(Entity entity) {
    if (worldObj.getDifficulty().equals(EnumDifficulty.EASY)) {
      int j = rand.nextInt(10);
      int k = rand.nextInt(20);
      if (j == 0) {
        ((EntityLivingBase) entity).addPotionEffect(new EnactEffect(Effect.bleeding.getId(), 20 * 300, 1));
      }
      if (k == 0) {
        ((EntityLivingBase) entity).addPotionEffect(new EnactEffect(Effect.zombification.getId(), 20 * 300, 1));
      }
      return entity.attackEntityFrom(DamageSource.causeMobDamage(this), 1);
    } else if (worldObj.getDifficulty().equals(EnumDifficulty.NORMAL)) {
      int j = rand.nextInt(5);
      int k = rand.nextInt(10);
      if (j == 0) {
        ((EntityLivingBase) entity).addPotionEffect(new EnactEffect(Effect.bleeding.getId(), 20 * 300, 1));