Ensure player entity schedulers are ticked when they are dead
If the player dies, then they are removed from the world and as a result are not present in the world entity map. To guarantee that the player entity scheduler is ticked, we can tick all schedulers for players in the server player list, and then skip all players we find in the world entity map. This problem is not present on Folia since Folia must guarantee that the player remains in the world.
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
+ // Paper end - Share random for entities to make them more random
|
||||
+ public @Nullable org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason; // Paper - Entity#getEntitySpawnReason
|
||||
+
|
||||
+ private @Nullable org.bukkit.craftbukkit.entity.CraftEntity bukkitEntity;
|
||||
+ private volatile @Nullable org.bukkit.craftbukkit.entity.CraftEntity bukkitEntity; // Paper - Folia schedulers - volatile
|
||||
+
|
||||
+ public org.bukkit.craftbukkit.entity.CraftEntity getBukkitEntity() {
|
||||
+ if (this.bukkitEntity == null) {
|
||||
|
||||
Reference in New Issue
Block a user