mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-17 21:02:04 +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);
|
return NMSImpl.teleportAcrossWorld(this, transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int fuseRenewalDelay = 9; // give client some time to make the animation look vanilla-like
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (npc != null) {
|
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();
|
npc.update();
|
||||||
} else {
|
} else {
|
||||||
super.tick();
|
super.tick();
|
||||||
|
Loading…
Reference in New Issue
Block a user