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

Method onStruckByLightning

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

Called when a lightning bolt hits the entity.

(EntityLightningBolt lightningBolt)

Source from the content-addressed store, hash-verified

2300 * Called when a lightning bolt hits the entity.
2301 */
2302 public void onStruckByLightning(EntityLightningBolt lightningBolt)
2303 {
2304 this.attackEntityFrom(DamageSource.lightningBolt, 5.0F);
2305 ++this.fire;
2306
2307 if (this.fire == 0)
2308 {
2309 this.setFire(8);
2310 }
2311 }
2312
2313 /**
2314 * This method gets called when the entity kills another one.

Callers 1

onUpdateMethod · 0.95

Calls 2

attackEntityFromMethod · 0.95
setFireMethod · 0.95

Tested by

no test coverage detected