[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: |
|
| 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. |