mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-24 19:46:15 +01:00
fix: TNT NPCs disappear while reached vanilla life limit (#3177)
This commit is contained in:
parent
601068c117
commit
63b0125be7
@ -106,9 +106,16 @@ public class TNTPrimedController extends MobEntityController {
|
||||
return NMSImpl.teleportAcrossWorld(this, transition);
|
||||
}
|
||||
|
||||
private int fuseRenewalDelay = 9; // give client some time to make the animation look vanilla-like
|
||||
@Override
|
||||
public void tick() {
|
||||
if (npc != null) {
|
||||
if (fuseRenewalDelay-- <= 0) {
|
||||
// DataWatcher refuses to mark dirty if we don't give different values
|
||||
setFuse(Integer.MAX_VALUE - 1);
|
||||
setFuse(Integer.MAX_VALUE);
|
||||
fuseRenewalDelay = 9;
|
||||
}
|
||||
npc.update();
|
||||
} else {
|
||||
super.tick();
|
||||
|
Loading…
Reference in New Issue
Block a user