fixed the plant boost effect not working

This commit is contained in:
Ellpeck 2020-02-08 01:21:29 +01:00
parent 5a44d3f8af
commit 66874dc33e

View file

@ -63,7 +63,7 @@ public class PlantBoostEffect implements IDrainSpotEffect {
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);
BlockPos plantPos = new BlockPos(x, world.getHeight(Heightmap.Type.WORLD_SURFACE, x, z), z);
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))
continue;