Fixed water turbine trying to move non-source blocks

This commit is contained in:
Calclavia 2014-02-25 19:15:17 +08:00
parent 2712e54a8f
commit e75ed07b77

View file

@ -56,8 +56,9 @@ public class TileWaterTurbine extends TileMechanicalTurbine
}
int blockIDAbove = worldObj.getBlockId(xCoord, yCoord + 1, zCoord);
int metadata = worldObj.getBlockMetadata(xCoord, yCoord + 1, zCoord);
if (blockIDAbove == Block.waterStill.blockID && worldObj.isAirBlock(xCoord, yCoord - 1, zCoord))
if (blockIDAbove == Block.waterStill.blockID && worldObj.isAirBlock(xCoord, yCoord - 1, zCoord) && metadata == 0)
{
powerTicks = 20;
worldObj.setBlockToAir(xCoord, yCoord + 1, zCoord);