Fix issue where mushrooms would not check the proper soil block.

This commit is contained in:
LexManos 2012-10-01 18:51:35 -07:00
parent eda74ffac2
commit 154124acd8
1 changed files with 4 additions and 2 deletions

View File

@ -9,12 +9,14 @@
public class BlockMushroom extends BlockFlower
{
@@ -94,7 +96,7 @@
@@ -94,7 +96,9 @@
if (par3 >= 0 && par3 < 256)
{
int var5 = par1World.getBlockId(par2, par3 - 1, par4);
- return var5 == Block.mycelium.blockID || par1World.getFullBlockLightValue(par2, par3, par4) < 13 && this.canThisPlantGrowOnThisBlockID(var5);
+ return var5 == Block.mycelium.blockID || par1World.getFullBlockLightValue(par2, par3, par4) < 13 && canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this);
+ Block soil = Block.blocksList[var5];
+ return (var5 == Block.mycelium.blockID || par1World.getFullBlockLightValue(par2, par3, par4) < 13) &&
+ (soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this));
}
else
{