MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / attackEntityFrom

Method attackEntityFrom

src/main/java/net/minecraft/entity/Entity.java:1495–1506  ·  view source on GitHub ↗

Called when the entity is attacked.

(DamageSource source, float amount)

Source from the content-addressed store, hash-verified

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

Callers 11

doExplosionAMethod · 0.95
onEntityUpdateMethod · 0.95
setOnFireFromLavaMethod · 0.95
dealFireDamageMethod · 0.95
onStruckByLightningMethod · 0.95
attackEntitiesInListMethod · 0.95
performEffectMethod · 0.45
affectEntityMethod · 0.45
onUpdateMethod · 0.45
onUserHurtMethod · 0.45

Calls 2

isEntityInvulnerableMethod · 0.95
setBeenAttackedMethod · 0.95

Tested by

no test coverage detected