Fixed kelp completely

This commit is contained in:
Adubbz 2013-09-12 18:31:46 +10:00
parent cbf0125cf6
commit ca3f1104a2
1 changed files with 4 additions and 4 deletions

View File

@ -98,7 +98,7 @@ public class BlockBOPCoral extends BlockFlower
return id == blockID;
case 2: // Kelp Top
return id == blockID;
return id == blockID || id == Block.dirt.blockID || id == Block.sand.blockID;
default:
return id == Block.dirt.blockID || id == Block.sand.blockID;
@ -114,14 +114,14 @@ public class BlockBOPCoral extends BlockFlower
if (world.getBlockMetadata(x, y, z) == 0 && world.getBlockId(x, y + 1, z) != blockID)
{
world.setBlock(x, y, z, blockID, 3, 2);
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
}
if (world.getBlockMetadata(x, y, z) == 1 && world.getBlockId(x, y + 1, z) != blockID)
{
if (world.getBlockId(x, y - 1, z) == blockID)
{
world.setBlock(x, y, z, blockID, 2, 2);
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
}
}
@ -138,7 +138,7 @@ public class BlockBOPCoral extends BlockFlower
if (!this.canBlockStay(world, x, y + i, z))
{
this.dropBlockAsItem(world, x, y + i, z, world.getBlockMetadata(x, y + i, z), 0);
world.setBlock(x, y + i, z, Block.waterStill.blockID, 0, 2 + 1);
world.setBlock(x, y + i, z, Block.waterMoving.blockID, 0, 2);
}
}
}