fixed the cache recharge effect not actually really recharging

This commit is contained in:
Ellpeck 2019-02-22 12:06:14 +01:00
parent d44501f925
commit c53229cd75
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ public class CacheRechargeEffect implements IDrainSpotEffect {
return false; return false;
int dist = MathHelper.clamp(aura / 3500, 3, 15); int dist = MathHelper.clamp(aura / 3500, 3, 15);
this.bb = new AxisAlignedBB(pos).grow(dist); this.bb = new AxisAlignedBB(pos).grow(dist);
this.amount = MathHelper.ceil(aura / 250000F / IAuraChunk.getSpotAmountInArea(world, pos, 20)) - 2; this.amount = MathHelper.ceil(aura / 250F / IAuraChunk.getSpotAmountInArea(world, pos, 20));
return true; return true;
} }

View file

@ -29,7 +29,7 @@ public class GrassDieEffect implements IDrainSpotEffect {
if (spot < 0) { if (spot < 0) {
int aura = IAuraChunk.getAuraInArea(world, pos, 50); int aura = IAuraChunk.getAuraInArea(world, pos, 50);
if (aura < 0) { if (aura < 0) {
this.amount = Math.min(300, Math.abs(aura) / 100000 / IAuraChunk.getSpotAmountInArea(world, pos, 50)); this.amount = Math.min(300, MathHelper.ceil(Math.abs(aura) / 100000F / IAuraChunk.getSpotAmountInArea(world, pos, 50)));
if (this.amount > 1) { if (this.amount > 1) {
this.dist = MathHelper.clamp(Math.abs(aura) / 75000, 5, 75); this.dist = MathHelper.clamp(Math.abs(aura) / 75000, 5, 75);
return true; return true;