Separate tick count to ensure vanilla parity (#12077)

This commit is contained in:
Creeam
2025-02-16 11:46:37 -08:00
committed by GitHub
parent b9023b5dc3
commit a3781ff3be
8 changed files with 54 additions and 46 deletions

View File

@@ -519,13 +519,14 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@Override
public int getTicksLived() {
return this.getHandle().tickCount;
return this.getHandle().totalEntityAge;
}
@Override
public void setTicksLived(int value) {
Preconditions.checkArgument(value > 0, "Age value (%s) must be greater than 0", value);
this.getHandle().tickCount = value;
this.getHandle().totalEntityAge = value;
}
public Entity getHandle() {