From c53229cd7505594948617cf600bc014c4f5a1bc3 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 22 Feb 2019 12:06:14 +0100 Subject: [PATCH] fixed the cache recharge effect not actually really recharging --- .../ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java | 2 +- .../de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java index 84421a7f..ad96e784 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java @@ -33,7 +33,7 @@ public class CacheRechargeEffect implements IDrainSpotEffect { return false; int dist = MathHelper.clamp(aura / 3500, 3, 15); 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; } diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java index 7d93da1f..b20caf8a 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java @@ -29,7 +29,7 @@ public class GrassDieEffect implements IDrainSpotEffect { if (spot < 0) { int aura = IAuraChunk.getAuraInArea(world, pos, 50); 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) { this.dist = MathHelper.clamp(Math.abs(aura) / 75000, 5, 75); return true;