Package net.minecraft.entity

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


        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

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

          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

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

                                    if (j > 20)
                                    {
                                        entityliving.addPotionEffect(new PotionEffect(i, j, potioneffect.getAmplifier()));
                                    }
                                }
                            }
                        }
                    }
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.