Passed right clicks onto the tile

This commit is contained in:
Robert Seifert 2013-06-09 06:13:39 -04:00
parent 3c43f66dd6
commit 0c6b9153ca

View file

@ -56,8 +56,7 @@ public class EntityTileDamage extends Entity implements IEntityAdditionalSpawnDa
}
else
{
this.hp -= ammount;
if (hp <= 0)
if ((hp -= ammount) <= 0)
{
if (this.host != null)
{
@ -197,4 +196,17 @@ public class EntityTileDamage extends Entity implements IEntityAdditionalSpawnDa
return false;
}
@Override
public boolean interact(EntityPlayer player)
{
if (this.host != null && player != null)
{
Block block = Block.blocksList[this.worldObj.getBlockId(this.host.xCoord, this.host.yCoord, this.host.zCoord)];
if (block != null)
{
return block.onBlockActivated(this.worldObj, this.host.xCoord, this.host.yCoord, this.host.zCoord, player, 0, 0, 0, 0);
}
}
return false;
}
}