Examples of addPotionEffect()


Examples of net.minecraft.entity.EntityLiving.addPotionEffect()

      {
        ent.addPotionEffect(new PotionEffect(Potion.nightVision.id, 60 * 20, 0));
      }
      else if(blockID == MineFactoryReloadedCore.milkLiquid.blockID)
      {
        ent.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 6 * 20, 0));
      }
      else if(blockID == MineFactoryReloadedCore.biofuelLiquid.blockID)
      {
        ent.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 12 * 20, 0));
      }
View Full Code Here

Examples of net.minecraft.entity.EntityLiving.addPotionEffect()

      {
        ent.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 6 * 20, 0));
      }
      else if(blockID == MineFactoryReloadedCore.biofuelLiquid.blockID)
      {
        ent.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 12 * 20, 0));
      }
    }
    super.onEntityCollidedWithBlock(world, x, y, z, entity);
  }
 
View Full Code Here

Examples of net.minecraft.entity.EntityLiving.addPotionEffect()

      handler.setSize(slime, 1);
     
      NBTTagList effectList = (NBTTagList)StackUtils.getTag(stack, "Effects");
      if (effectList != null)
        for (int i = 0; i < effectList.tagCount(); i++)
          slime.addPotionEffect(PotionEffect.readCustomPotionEffectFromNBT(
              effectList.getCompoundTagAt(i)));
     
      world.spawnEntityInWorld(slime);
      slime.playSound("mob.slime.big", 1.2F, 0.6F);
     
View Full Code Here

Examples of net.minecraft.entity.EntityLivingBase.addPotionEffect()

          break;
        }
        case 2: {
          EntityLivingBase living = (EntityLivingBase) entity;
          PotionEffect effect = new PotionEffect(Potion.resistance.id, 1, 1);
          living.addPotionEffect(effect);

          SoulHeartHandler.addHearts(player);

          break;
        }
View Full Code Here

Examples of net.minecraft.entity.EntityLivingBase.addPotionEffect()

        if(item instanceof EntityLivingBase) {
          EntityLivingBase targetEntity = (EntityLivingBase)item;
          targetEntity.fallDistance = 0.0F;
          if(targetEntity.getActivePotionEffect(Potion.moveSlowdown) == null)
            targetEntity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2, 3, true));
        }

        Vector3 target3 = Vector3.fromEntityCenter(player);
        target3.add(new Vector3(player.getLookVec()).multiply(length));
        target3.y += 0.5;
View Full Code Here

Examples of net.minecraft.entity.EntityLivingBase.addPotionEffect()

            }
          }
         
          if(smokeThem)
            for(PotionEffect effect : type.smokeEffects)
              entity.addPotionEffect(new PotionEffect(effect));
        }
      }
     
      smokeTime--;
      if(smokeTime == 0)
View Full Code Here

Examples of net.minecraft.entity.EntityLivingBase.addPotionEffect()

          if(entityHit.entity.attackEntityFrom(getBulletDamage(false), damage * type.damageVsLiving) && entityHit.entity instanceof EntityLivingBase)
          {
            EntityLivingBase living = (EntityLivingBase)entityHit.entity;
            for(PotionEffect effect : type.hitEffects)
            {
              living.addPotionEffect(new PotionEffect(effect));
            }
            //If the attack was allowed, we should remove their immortality cooldown so we can shoot them again. Without this, any rapid fire gun become useless
            living.arrowHitTimer++;
            living.hurtResistantTime = living.maxHurtResistantTime / 2;
          }
View Full Code Here

Examples of net.minecraft.entity.EntityLivingBase.addPotionEffect()

                                {
                                    int j = (int) (d1 * (double) potioneffect.getDuration() + 0.5D);

                                    if (j > 20)
                                    {
                                        entityliving.addPotionEffect(new PotionEffect(i, j, potioneffect.getAmplifier()));
                                    }
                                }
                            }
                        }
                    }
View Full Code Here

Examples of net.minecraft.entity.monster.EntitySlime.addPotionEffect()

    EntityTNTPrimed armedTNT = (EntityTNTPrimed)MFRUtil.prepareMob(EntityTNTPrimed.class, world);
    armedTNT.fuse = 120;
    mobs.add(new RandomMob(armedTNT, 5));
   
    EntitySlime invisislime = (EntitySlime)MFRUtil.prepareMob(EntitySlime.class, world);
    invisislime.addPotionEffect(new PotionEffect(Potion.invisibility.id, 120 * 20));
    mobs.add(new RandomMob(invisislime, 5));
   
    EntityMooshroom invisishroom = (EntityMooshroom)MFRUtil.prepareMob(EntityMooshroom.class, world);
    invisishroom.addPotionEffect(new PotionEffect(Potion.invisibility.id, 120 * 20));
    mobs.add(new RandomMob(invisishroom, 5));
View Full Code Here

Examples of net.minecraft.entity.passive.EntityMooshroom.addPotionEffect()

    EntitySlime invisislime = (EntitySlime)MFRUtil.prepareMob(EntitySlime.class, world);
    invisislime.addPotionEffect(new PotionEffect(Potion.invisibility.id, 120 * 20));
    mobs.add(new RandomMob(invisislime, 5));
   
    EntityMooshroom invisishroom = (EntityMooshroom)MFRUtil.prepareMob(EntityMooshroom.class, world);
    invisishroom.addPotionEffect(new PotionEffect(Potion.invisibility.id, 120 * 20));
    mobs.add(new RandomMob(invisishroom, 5));
   
    EntitySkeleton skeleton1 = (EntitySkeleton)MFRUtil.prepareMob(EntitySkeleton.class, world);
    EntitySkeleton skeleton2 = (EntitySkeleton)MFRUtil.prepareMob(EntitySkeleton.class, world);
    EntitySkeleton skeleton3 = (EntitySkeleton)MFRUtil.prepareMob(EntitySkeleton.class, world);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.