[ci skip] Add more identifying patch comments

This commit is contained in:
Nassim Jahnke
2024-01-18 18:52:00 +01:00
parent 16f89b4fa7
commit ec3867cd12
40 changed files with 162 additions and 162 deletions

View File

@@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void baseTick() {
this.level().getProfiler().push("entityBaseTick");
+ if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
+ if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups
this.feetBlockState = null;
if (this.isPassenger() && this.getVehicle().isRemoved()) {
this.stopRiding();
@@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- }
-
- }
+ // Paper - Moved diff to separate method
+ // Paper - Prevent entity loading causing async lookups; Moved diff to separate method
+ // If this entity already survived its first tick, e.g. is loaded and ticked in sync, actively
+ // tick the initial persistent anger.
+ // If not, let the first tick on the baseTick call the method later down the line.
@@ -49,7 +49,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Nullable
LivingEntity getTarget();
+
+ // Paper start - Update last hurt when ticking
+ // Paper start - Prevent entity loading causing async lookups
+ // Update last hurt when ticking
+ default void tickInitialPersistentAnger(Level level) {
+ UUID target = getPersistentAngerTarget();
+ if (target == null) {
@@ -69,5 +70,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ }
+ }
+ // Paper end
+ // Paper end - Prevent entity loading causing async lookups
}