From df36d229fcfc732e2badbf7bfce5c8225775007b Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Fri, 3 Dec 2021 21:28:15 +0000 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9115281f SPIGOT-6832: Improve Player#getPing docs CraftBukkit Changes: fd3478bc7 #967: Store last lava contact location for events Spigot Changes: dbf49382 Rebuild patches 58cb9d26 #113: Use simulationDistance for entity activation range base --- ...option-to-nerf-pigmen-from-nether-portals.patch | 6 +++--- patches/server/Cap-Entity-Collisions.patch | 10 +++++----- patches/server/Entity-Activation-Range-2.0.patch | 12 ++++++------ patches/server/Entity-Origin-API.patch | 14 +++++++------- patches/server/Entity-fromMobSpawner.patch | 12 ++++++------ patches/server/Timings-v2.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/patches/server/Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/Add-option-to-nerf-pigmen-from-nether-portals.patch index 84eff3e3ca..0b413da03c 100644 --- a/patches/server/Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -25,13 +25,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i + // Paper start public long activatedImmunityTick = Integer.MIN_VALUE; // Paper public boolean isTemporarilyActive = false; // Paper - public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one + public boolean fromNetherPortal; // Paper protected int numCollisions = 0; // Paper - public void inactiveTick() { } - // Spigot end + public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one + @javax.annotation.Nullable @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i if (spawnedViaMobSpawner) { nbt.putBoolean("Paper.FromMobSpawner", true); diff --git a/patches/server/Cap-Entity-Collisions.patch b/patches/server/Cap-Entity-Collisions.patch index 740c5ad34e..8fe470ac51 100644 --- a/patches/server/Cap-Entity-Collisions.patch +++ b/patches/server/Cap-Entity-Collisions.patch @@ -31,13 +31,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i - public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); - public final boolean defaultActivationState; - public long activatedTick = Integer.MIN_VALUE; -+ protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end - + // Paper start ++ protected int numCollisions = 0; // Paper + @javax.annotation.Nullable + private org.bukkit.util.Vector origin; + @javax.annotation.Nullable diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/patches/server/Entity-Activation-Range-2.0.patch b/patches/server/Entity-Activation-Range-2.0.patch index e758275074..f26c373e39 100644 --- a/patches/server/Entity-Activation-Range-2.0.patch +++ b/patches/server/Entity-Activation-Range-2.0.patch @@ -120,14 +120,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i - public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); - public final boolean defaultActivationState; - public long activatedTick = Integer.MIN_VALUE; + public void inactiveTick() { } + // Spigot end + // Paper start + public long activatedImmunityTick = Integer.MIN_VALUE; // Paper + public boolean isTemporarilyActive = false; // Paper - public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one protected int numCollisions = 0; // Paper - public void inactiveTick() { } + public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one + @javax.annotation.Nullable @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } else { this.wasOnFire = this.isOnFire(); @@ -503,7 +503,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + maxRange = Math.max( maxRange, waterActivationRange ); + maxRange = Math.max( maxRange, villagerActivationRange ); + // Paper end - maxRange = Math.min( ( world.spigotConfig.viewDistance << 4 ) - 8, maxRange ); + maxRange = Math.min( ( world.spigotConfig.simulationDistance << 4 ) - 8, maxRange ); for ( Player player : world.players() ) @@ -0,0 +0,0 @@ public class ActivationRange diff --git a/patches/server/Entity-Origin-API.patch b/patches/server/Entity-Origin-API.patch index a86493e95d..cb71fad679 100644 --- a/patches/server/Entity-Origin-API.patch +++ b/patches/server/Entity-Origin-API.patch @@ -29,9 +29,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i - public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only - public boolean forceExplosionKnockback; // SPIGOT-949 - public boolean persistentInvisibility = false; + public long activatedTick = Integer.MIN_VALUE; + public void inactiveTick() { } + // Spigot end + // Paper start + @javax.annotation.Nullable + private org.bukkit.util.Vector origin; @@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.origin = location.toVector(); + this.originWorld = location.getWorld().getUID(); + } -+ + + @javax.annotation.Nullable + public org.bukkit.util.Vector getOriginVector() { + return this.origin != null ? this.origin.clone() : null; @@ -53,9 +53,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return this.originWorld; + } + // Paper end - // Spigot start - public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); - public final boolean defaultActivationState; + public float getBukkitYaw() { + return this.yRot; + } @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i this.bukkitEntity.storeBukkitValues(nbt); } diff --git a/patches/server/Entity-fromMobSpawner.patch b/patches/server/Entity-fromMobSpawner.patch index 9759305a11..214fdc81a6 100644 --- a/patches/server/Entity-fromMobSpawner.patch +++ b/patches/server/Entity-fromMobSpawner.patch @@ -9,13 +9,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i - public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); - public final boolean defaultActivationState; - public long activatedTick = Integer.MIN_VALUE; -+ public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one - protected int numCollisions = 0; // Paper - public void inactiveTick() { } // Spigot end + // Paper start + protected int numCollisions = 0; // Paper ++ public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one + @javax.annotation.Nullable + private org.bukkit.util.Vector origin; + @javax.annotation.Nullable @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); diff --git a/patches/server/Timings-v2.patch b/patches/server/Timings-v2.patch index 49175f7fed..686d1d3eeb 100644 --- a/patches/server/Timings-v2.patch +++ b/patches/server/Timings-v2.patch @@ -1424,9 +1424,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i - public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public boolean forceExplosionKnockback; // SPIGOT-949 public boolean persistentInvisibility = false; + public BlockPos lastLavaContact; - public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot // Spigot start public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); diff --git a/work/Bukkit b/work/Bukkit index f023e77ad7..9115281ff1 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit f023e77ad7343fa11812d3118efc956b67cdd242 +Subproject commit 9115281ff1762658109d43c1bd4fca8b7814d7f2 diff --git a/work/CraftBukkit b/work/CraftBukkit index 748ea518b1..fd3478bc77 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 748ea518b10c586582dd215a9663cf819fe7ab3e +Subproject commit fd3478bc77e3b1280e1e02dba6822490a51f011d diff --git a/work/Spigot b/work/Spigot index 3c40a6c908..dbf493829e 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 3c40a6c908b0a67b05ebf8f5268d64838e117d41 +Subproject commit dbf493829eb4bf37ff6492e725058424138cc651