From 19cc8f4a52551b79435663f2090b6f7b99d0d4ba Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 28 Jun 2021 14:16:34 +0200 Subject: [PATCH] stop using nextGaussian for PlantBoostEffect because it's cool but very slow --- .../de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java index ffdce617..9c4766ed 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java @@ -61,8 +61,8 @@ public class PlantBoostEffect implements IDrainSpotEffect { if (!this.calcValues(world, pos, spot)) return; for (int i = this.amount / 2 + world.rand.nextInt(this.amount / 2); i >= 0; i--) { - int x = MathHelper.floor(pos.getX() + world.rand.nextGaussian() * this.dist); - int z = MathHelper.floor(pos.getZ() + world.rand.nextGaussian() * this.dist); + int x = MathHelper.floor(pos.getX() + (2 * world.rand.nextFloat() - 1) * this.dist); + int z = MathHelper.floor(pos.getZ() + (2 * world.rand.nextFloat() - 1) * this.dist); BlockPos plantPos = new BlockPos(x, world.getHeight(Heightmap.Type.WORLD_SURFACE, x, z), z).down(); if (plantPos.distanceSq(pos) <= this.dist * this.dist && world.isBlockLoaded(plantPos)) { if (NaturesAuraAPI.instance().isEffectPowderActive(world, plantPos, NAME))