Fix issue where mushrooms would not check the proper soil block.
This commit is contained in:
parent
eda74ffac2
commit
154124acd8
|
@ -9,12 +9,14 @@
|
||||||
|
|
||||||
public class BlockMushroom extends BlockFlower
|
public class BlockMushroom extends BlockFlower
|
||||||
{
|
{
|
||||||
@@ -94,7 +96,7 @@
|
@@ -94,7 +96,9 @@
|
||||||
if (par3 >= 0 && par3 < 256)
|
if (par3 >= 0 && par3 < 256)
|
||||||
{
|
{
|
||||||
int var5 = par1World.getBlockId(par2, par3 - 1, par4);
|
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 && 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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue