I wanted to make a mod for me and my friends to play with and it will give player blindness 10 when they are standing still and 5 when they are running, then I found this:
if (this.isSprinting())
{
this.jumpMovementFactor = (float)((double)this.jumpMovementFactor + (double)this.speedInAir * 0.3D);
}
so I want to do EntityLivingBase.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, 20, 1)); here but eclipse told me I need to change addPotionEffect to static, why.
Edited:
And since blindness stops sprinting so I need to make blindness doesn't stop sprinting and I have no idea how