Called when the entity is attacked.
(DamageSource source, float amount)
| 1493 | * Called when the entity is attacked. |
| 1494 | */ |
| 1495 | public boolean attackEntityFrom(DamageSource source, float amount) |
| 1496 | { |
| 1497 | if (this.isEntityInvulnerable(source)) |
| 1498 | { |
| 1499 | return false; |
| 1500 | } |
| 1501 | else |
| 1502 | { |
| 1503 | this.setBeenAttacked(); |
| 1504 | return false; |
| 1505 | } |
| 1506 | } |
| 1507 | |
| 1508 | /** |
| 1509 | * interpolated look vector |
no test coverage detected