check global player list where appropriate

Makes certain entities check all players when searching for a player
instead of just checking players in their world.
This commit is contained in:
Jake Potrebic
2022-11-22 13:16:01 -08:00
parent ba6112b959
commit 012c32fac7
5 changed files with 73 additions and 17 deletions

View File

@@ -118,6 +118,15 @@
while (iterator.hasNext()) {
EquipmentSlot enumitemslot = (EquipmentSlot) iterator.next();
@@ -240,7 +262,7 @@
entityvillager.finalizeSpawn(world, world.getCurrentDifficultyAt(entityvillager.blockPosition()), EntitySpawnReason.CONVERSION, (SpawnGroupData) null);
entityvillager.refreshBrain(world);
if (this.conversionStarter != null) {
- Player entityhuman = world.getPlayerByUUID(this.conversionStarter);
+ Player entityhuman = world.getGlobalPlayerByUUID(this.conversionStarter); // Paper - check global player list where appropriate
if (entityhuman instanceof ServerPlayer) {
CriteriaTriggers.CURED_ZOMBIE_VILLAGER.trigger((ServerPlayer) entityhuman, this, entityvillager);
@@ -248,12 +270,16 @@
}
}