diff --git a/src/minecraft/tdwp_ftw/biomesop/helpers/BonemealUse.java b/src/minecraft/tdwp_ftw/biomesop/helpers/BonemealUse.java index 86cb781bd..d8a05b207 100644 --- a/src/minecraft/tdwp_ftw/biomesop/helpers/BonemealUse.java +++ b/src/minecraft/tdwp_ftw/biomesop/helpers/BonemealUse.java @@ -215,13 +215,16 @@ public class BonemealUse if (event.ID == BOPBlocks.mangroveSapling.blockID) { - event.setResult(Result.ALLOW); - - if (!event.world.isRemote) + if (event.world.getBlockId(event.X, event.Y - 1, event.Z) == Block.sand.blockID) { - if ((double)event.world.rand.nextFloat() < 0.45D) + event.setResult(Result.ALLOW); + + if (!event.world.isRemote) { - ((BlockMangroveSapling)BOPBlocks.mangroveSapling).growTree(event.world, event.X, event.Y, event.Z, event.world.rand); + if ((double)event.world.rand.nextFloat() < 0.45D) + { + ((BlockMangroveSapling)BOPBlocks.mangroveSapling).growTree(event.world, event.X, event.Y, event.Z, event.world.rand); + } } } } diff --git a/src/minecraft/tdwp_ftw/biomesop/items/projectiles/DispenserBehaviorMudball.java b/src/minecraft/tdwp_ftw/biomesop/items/projectiles/DispenserBehaviorMudball.java index d16c33ba7..6e3fd600f 100644 --- a/src/minecraft/tdwp_ftw/biomesop/items/projectiles/DispenserBehaviorMudball.java +++ b/src/minecraft/tdwp_ftw/biomesop/items/projectiles/DispenserBehaviorMudball.java @@ -1,14 +1,14 @@ -package tdwp_ftw.biomesop.items.projectiles; - -import net.minecraft.dispenser.BehaviorProjectileDispense; -import net.minecraft.dispenser.IPosition; -import net.minecraft.entity.IProjectile; -import net.minecraft.world.World; - -public class DispenserBehaviorMudball extends BehaviorProjectileDispense -{ - protected IProjectile getProjectileEntity(World par1World, IPosition par2IPosition) - { - return new EntityMudball(par1World, par2IPosition.getX(), par2IPosition.getY(), par2IPosition.getZ()); - } -} +package tdwp_ftw.biomesop.items.projectiles; + +import net.minecraft.dispenser.BehaviorProjectileDispense; +import net.minecraft.dispenser.IPosition; +import net.minecraft.entity.IProjectile; +import net.minecraft.world.World; + +public class DispenserBehaviorMudball extends BehaviorProjectileDispense +{ + protected IProjectile getProjectileEntity(World par1World, IPosition par2IPosition) + { + return new EntityMudball(par1World, par2IPosition.getX(), par2IPosition.getY(), par2IPosition.getZ()); + } +}