Package net.minecraft.entity.player

Examples of net.minecraft.entity.player.EntityPlayer.addPotionEffect()


      ItemStack amulet = PlayerHandler.getPlayerBaubles(player).getStackInSlot(0);

      if(amulet != null && amulet.getItem() == this) {
        event.setCanceled(true);
        player.setHealth(player.getMaxHealth());
        player.addPotionEffect(new PotionEffect(Potion.resistance.id, 300, 6));
        player.addChatMessage(new ChatComponentTranslation("botaniamisc.savedByLaurel"));
        player.worldObj.playSoundAtEntity(player, "botania:goldenLaurel", 1F, 0.3F);
        PlayerHandler.getPlayerBaubles(player).setInventorySlotContents(0, null);
      }
    }
View Full Code Here


        EntityPlayer player = e.player;
        if (!PermissionsManager.checkPermission(player, BYPASSPOTION))
        {
            for (PotionEffect effect : potionEffects)
            {
                player.addPotionEffect(effect);
            }
        }
        if (!PermissionsManager.checkPermission(player, BYPASSSTATS))
        {
            player.getFoodStats().addStats(-1 * (20 - food), 0);
View Full Code Here

      else if (count > 1)
        duration = 400;
      else if (count > 0)
        duration = 600;

      player.addPotionEffect(new PotionEffect(Potion.poison.id, duration, 0));
    }

    return storedData;
  }
View Full Code Here

    @SuppressWarnings("rawtypes")
    List list = housing.getWorld().getEntitiesWithinAABB(EntityPlayer.class, beatifyBox);

    for (Object obj : list) {
      EntityPlayer player = (EntityPlayer) obj;
      player.addPotionEffect(new PotionEffect(potionId, duration, 0));
    }

    return storedData;
  }
View Full Code Here

            if (stack != null && player.isUsingItem())
            {
                Item item = stack.getItem();
                if (item == TinkerTools.cutlass)
                {
                    player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 3 * 20, 1));
                }
                else if (item == TinkerTools.battlesign)
                {
                    event.ammount *= 1.5; //Puts battlesign blocking at 3/4 instead of 1/2
                }
View Full Code Here

        {
            EntityPlayer player = (EntityPlayer) entity;
            ItemStack equipped = player.getCurrentEquippedItem();
            if (equipped == stack)
            {
                player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 2, 2, true));
            }
        }
    }

    /*
 
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.