Solved how to add a potioneffect to an entity

Discussion in 'Plugin Development' started by xpaintall, Feb 26, 2022.

Thread Status:
Not open for further replies.
  1. Offline

    xpaintall

    hey guys does anyone have an idea on how to change the speed of a pig that's being ridden?
    i've already tried
    Code:
    this.addEffect(new MobEffect(MobEffects.a, 1000000, 2));
    but it only works when the pig is free, eg. the pig isn't being ridden, so while i'm luring it with a carrot, it is faster than the player, but when i start riding it and get the carrot on a stick in my inventory, it's slow af, completely ignoring the potion effect the pig has
     
Thread Status:
Not open for further replies.

Share This Page