Player Weight Mod

Player Weight Mod

35.2k Downloads

min/max in effect are both inclusive

WazWaz opened this issue ยท 2 comments

commented

if(totalWeight >= effect.minWeight() && totalWeight <= effect.maxWeight())

This means that if the max (eg. 50) of one effect is the same as the min of another, both effects are applied, forcing config to use "max:49.99999", which will always leave a slim area where no effect is applied for that exact weight.

Either min or max should be exclusive. I'd suggest min, so that it means "apply this effect is weight is above the minimum, and less than or equal to the maximum".

commented

ok

commented

ok fixed now. Sry that it took so long, being ill for a week and i needed a rest from mc modding took it a bit longer. Its now a > effect.minWeight & <= effect.maxWeight