[SPIGOT-6292] LivingEntity.setNoDamageTicks​() serves no purpose Created: 25/Dec/20  Updated: 27/Dec/20  Resolved: 27/Dec/20

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: acbat Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

N/A


Attachments: PNG File image-2020-12-25-16-33-50-730.png     PNG File image-2020-12-25-16-35-30-960.png    
Version: git-Spigot-37d799b-3eb7236 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

Due to a programming oversight, the maxNoDamageTicks field in EntityLiving.java is no longer used.

This means LivingEntity.setNoDamageTicks​() now does nothing. It sets the value of maxNoDamageTicks, but that field is never used.

In the past, damageEntity() function in EntityLiving.java used maxNoDamageTicks:

Now, maxNoDamageTicks is set but never used.

Recommendation: Consider updating the damageEntity() function in LivingEntity.java so that it makes use of the maxNoDamageTicks field again.


Generated at Sat Dec 13 15:20:55 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.