• 0

    posted a message on [1.7.x/1.8][Forge] Making custom armor that adds potion effects and more
    Quote from 3man7»
    Just found a tutorial here that uses the onUpdate method. Works great for me :D

    @Override
    public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {
      super.onUpdate(stack, world, entity, par4, par5);
      EntityPlayer player = (EntityPlayer) entity;
      ItemStack equipped = player.getCurrentEquippedItem();
      if(equipped == stack) {
       player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 5, 0));
      }
    }



    Credit goes to

    What program is this?

    Posted in: Mapping and Modding Tutorials
  • To post a comment, please .