Fix incorrect phantom spawning entity (#9385)

This commit is contained in:
Molean 2023-06-23 18:50:29 +08:00 committed by GitHub
parent b1696788d6
commit 206dd3af05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,7 @@ index 61ba99d99cc4e7782450ee6aa8b6c87b1a42cb3a..a18e6296d1f50c53291d41192a100960
Phantom entityphantom = (Phantom) EntityType.PHANTOM.create(world);
if (entityphantom != null) {
+ entityphantom.setSpawningEntity(entityphantom.getUUID()); // Paper
+ entityphantom.setSpawningEntity(entityplayer.getUUID()); // Paper
entityphantom.moveTo(blockposition1, 0.0F, 0.0F);
groupdataentity = entityphantom.finalizeSpawn(world, difficultydamagescaler, MobSpawnType.NATURAL, groupdataentity, (CompoundTag) null);
world.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit