mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
make grass decay size based on the amount of missing aura
This commit is contained in:
parent
6c89a0162e
commit
cd2947f825
1 changed files with 21 additions and 19 deletions
|
@ -18,7 +18,8 @@ public class GrassDieEffect implements IDrainSpotEffect {
|
|||
if (aura < 0) {
|
||||
int amount = Math.min(300, Math.abs(aura) / 1000);
|
||||
if (amount > 0) {
|
||||
int dist = 25;
|
||||
int dist = Math.min(45, Math.abs(aura) / 750);
|
||||
if (dist > 0) {
|
||||
for (int i = amount / 2 + world.rand.nextInt(amount / 2); i >= 0; i--) {
|
||||
BlockPos grassPos = new BlockPos(
|
||||
pos.getX() + world.rand.nextGaussian() * dist,
|
||||
|
@ -46,3 +47,4 @@ public class GrassDieEffect implements IDrainSpotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue