diff --git a/patches/server/Refresh-ProjectileSource-for-projectiles.patch b/patches/server/Refresh-ProjectileSource-for-projectiles.patch index d8f994e1e5..b883c244fa 100644 --- a/patches/server/Refresh-ProjectileSource-for-projectiles.patch +++ b/patches/server/Refresh-ProjectileSource-for-projectiles.patch @@ -8,6 +8,11 @@ the API matches the owner UUID specified in the entity nbt. Previously, after the entity reloaded, Projectile#getShooter would return null, while the entity still had an owner. +Also fixes setting the shooter/owner to null actually +clearing the owner. + +Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com> + diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java @@ -30,6 +35,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } - this.projectileSource = (entity != null && entity.getBukkitEntity() instanceof ProjectileSource) ? (ProjectileSource) entity.getBukkitEntity() : null; // CraftBukkit - ++ // Paper start - Fix null owners not being handled ++ else { ++ this.ownerUUID = null; ++ this.cachedOwner = null; ++ this.projectileSource = null; ++ } ++ // Paper end + this.refreshProjectileSource(false); // Paper + } + // Paper start