Started by
Synranelt
on
Topic category: Troubleshooting, bugs, and solutions
So I was working on a custom potion and I wanted to change the tick interval between when the potion triggers so I edited it in the code editor. I replaced this code
@Override
public boolean isReady(int duration, int amplifier) {
return true;
}
With this
public boolean isReady(int duration, int amplifier) {
int k = 2 >> amplifier;
if (k > 0)
return duration % k == 0;
else
return true;
}
it worked first try but as soon as I reloaded Mcreator the potion ceased to have any function whatsoever. I'm not sure what I did wrong and I don't know how to fix it. Does anybody know how to fix this?