// 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.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.World;

  @Override
  protected float getVelocity() {
    return 3F;
  }

  protected float getGravityVelocity() {
    return 0.01F;
  }


  /**
   * Called when this EntityBullet hits a block or entity.
   */
  @Override
  protected void onImpact(MovingObjectPosition position) {
    if (position.entityHit != null) {
      if (position.entityHit instanceof EntityLivingBase) {
        position.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, getThrower()), bulletdamage);
      }

      if (position.entityHit instanceof EntityPlayer) {
        if (worldObj.getDifficulty().equals(EnumDifficulty.EASY)) {
          int j = rand.nextInt(10);
          if (j == 0) {
            ((EntityLivingBase) position.entityHit).addPotionEffect(new EnactEffect(Effect.bleeding.getId(), 20 * 300, 1));
          }
        } else if (worldObj.getDifficulty().equals(EnumDifficulty.NORMAL)) {
          int j = rand.nextInt(5);
          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/EntityBullet.java
import com.github.dayzminecraft.dayzminecraft.common.effects.Effect;
import com.github.dayzminecraft.dayzminecraft.common.effects.EnactEffect;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.World;


  @Override
  protected float getVelocity() {
    return 3F;
  }

  protected float getGravityVelocity() {
    return 0.01F;
  }


  /**
   * Called when this EntityBullet hits a block or entity.
   */
  @Override
  protected void onImpact(MovingObjectPosition position) {
    if (position.entityHit != null) {
      if (position.entityHit instanceof EntityLivingBase) {
        position.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, getThrower()), bulletdamage);
      }

      if (position.entityHit instanceof EntityPlayer) {
        if (worldObj.getDifficulty().equals(EnumDifficulty.EASY)) {
          int j = rand.nextInt(10);
          if (j == 0) {
            ((EntityLivingBase) position.entityHit).addPotionEffect(new EnactEffect(Effect.bleeding.getId(), 20 * 300, 1));
          }
        } else if (worldObj.getDifficulty().equals(EnumDifficulty.NORMAL)) {
          int j = rand.nextInt(5);
          if (j == 0) {
            ((EntityLivingBase) position.entityHit).addPotionEffect(new EnactEffect(Effect.bleeding.getId(), 20 * 300, 1));