mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 20:22:05 -07:00
Separate tick count to ensure vanilla parity (#12077)
This commit is contained in:
@@ -460,7 +460,7 @@
|
||||
}
|
||||
|
||||
public void resetEmptyTime() {
|
||||
@@ -746,18 +_,45 @@
|
||||
@@ -746,18 +_,46 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -487,6 +487,7 @@
|
||||
entity.setOldPosAndRot();
|
||||
ProfilerFiller profilerFiller = Profiler.get();
|
||||
entity.tickCount++;
|
||||
+ entity.totalEntityAge++; // Paper - age-like counter for all entities
|
||||
profilerFiller.push(() -> BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString());
|
||||
profilerFiller.incrementCounter("tickNonPassenger");
|
||||
entity.tick();
|
||||
@@ -506,7 +507,12 @@
|
||||
}
|
||||
|
||||
private void tickPassenger(Entity ridingEntity, Entity passengerEntity) {
|
||||
@@ -770,6 +_,7 @@
|
||||
@@ -766,10 +_,12 @@
|
||||
} else if (passengerEntity instanceof Player || this.entityTickList.contains(passengerEntity)) {
|
||||
passengerEntity.setOldPosAndRot();
|
||||
passengerEntity.tickCount++;
|
||||
+ passengerEntity.totalEntityAge++; // Paper - age-like counter for all entities
|
||||
ProfilerFiller profilerFiller = Profiler.get();
|
||||
profilerFiller.push(() -> BuiltInRegistries.ENTITY_TYPE.getKey(passengerEntity.getType()).toString());
|
||||
profilerFiller.incrementCounter("tickPassenger");
|
||||
passengerEntity.rideTick();
|
||||
|
Reference in New Issue
Block a user