[ci skip] Add more patch identifying comments, merge related patches
This commit is contained in:
parent
44f3ecd436
commit
64b98ef110
29 changed files with 147 additions and 147 deletions
|
@ -21,7 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public boolean inWorld = false;
|
||||
public boolean generation;
|
||||
public int maxAirTicks = this.getDefaultMaxAirSupply(); // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
|
||||
+ @Nullable // Paper
|
||||
+ @Nullable // Paper - Refresh ProjectileSource for projectiles
|
||||
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
|
||||
public boolean lastDamageCancelled; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
|
||||
public boolean persistentInvisibility = false;
|
||||
|
@ -35,16 +35,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
- this.projectileSource = (entity != null && entity.getBukkitEntity() instanceof ProjectileSource) ? (ProjectileSource) entity.getBukkitEntity() : null; // CraftBukkit
|
||||
-
|
||||
+ // Paper start - Fix null owners not being handled
|
||||
+ // Paper start - Refresh ProjectileSource for projectiles
|
||||
+ else {
|
||||
+ this.ownerUUID = null;
|
||||
+ this.cachedOwner = null;
|
||||
+ this.projectileSource = null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Refresh ProjectileSource for projectiles
|
||||
+ this.refreshProjectileSource(false); // Paper
|
||||
+ }
|
||||
+ // Paper start
|
||||
+ // Paper start - Refresh ProjectileSource for projectiles
|
||||
+ public void refreshProjectileSource(boolean fillCache) {
|
||||
+ if (fillCache) {
|
||||
+ this.getOwner();
|
||||
|
@ -53,13 +53,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.projectileSource = projSource;
|
||||
+ }
|
||||
}
|
||||
+ // Paper end
|
||||
+ // Paper end - Refresh ProjectileSource for projectiles
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Entity getOwner() {
|
||||
if (this.cachedOwner != null && !this.cachedOwner.isRemoved()) {
|
||||
+ this.refreshProjectileSource(false); // Paper
|
||||
+ this.refreshProjectileSource(false); // Paper - Refresh ProjectileSource for projectiles
|
||||
return this.cachedOwner;
|
||||
} else {
|
||||
if (this.ownerUUID != null) {
|
||||
|
@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
ServerLevel worldserver = (ServerLevel) world;
|
||||
|
||||
this.cachedOwner = worldserver.getEntity(this.ownerUUID);
|
||||
+ this.refreshProjectileSource(false); // Paper
|
||||
+ this.refreshProjectileSource(false); // Paper - Refresh ProjectileSource for projectiles
|
||||
return this.cachedOwner;
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
@Override
|
||||
public final org.bukkit.projectiles.ProjectileSource getShooter() {
|
||||
+ this.getHandle().refreshProjectileSource(true); // Paper
|
||||
+ this.getHandle().refreshProjectileSource(true); // Paper - Refresh ProjectileSource for projectiles
|
||||
return this.getHandle().projectileSource;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue