fix the plant boost effect not happening in certain occasions even though it should

This commit is contained in:
Ellpeck 2019-02-22 11:56:36 +01:00
parent 246ce3afe1
commit d44501f925

View file

@ -34,7 +34,7 @@ public class PlantBoostEffect implements IDrainSpotEffect {
int aura = IAuraChunk.getAuraInArea(world, pos, 30);
if (aura < 1500000)
return false;
this.amount = Math.min(45, Math.abs(aura) / 100000 / IAuraChunk.getSpotAmountInArea(world, pos, 30));
this.amount = Math.min(45, MathHelper.ceil(Math.abs(aura) / 100000F / IAuraChunk.getSpotAmountInArea(world, pos, 30)));
if (this.amount <= 1)
return false;
this.dist = MathHelper.clamp(Math.abs(aura) / 150000, 5, 35);