Skip to content

Commit

Permalink
Updated Upstream (Paper & Purpur)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@39953cf Take in account waterlogged blocks for scaffolding (#9676)
PaperMC/Paper@471f4de Copy NBT in upgrade data neighbor ticks
PaperMC/Paper@33bec7f Copy NBT in legacy dragon fight converter

Purpur Changes:
PurpurMC/Purpur@042e192 Updated Upstream (Pufferfish)
PurpurMC/Purpur@617240e Updated Upstream (Paper)
PurpurMC/Purpur@671c31a Updated Upstream (Paper)
  • Loading branch information
github-actions[bot] committed Sep 9, 2023
1 parent 34162ce commit a76facf
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 82 deletions.
4 changes: 2 additions & 2 deletions .upstream-data
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
purpurCommit = 423c2af60ca5e9d18ac0bd955d0313efc693d2a3
pufferfishCommit = a3c0a4d2f177d80283d03de52617732a7b493665
purpurCommit = 671c31a78762994ead0b11a46e0257d6b9fafd0e
pufferfishCommit = e32a780bcab6821e3804846a63a9153fdeee44f4
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
group = org.plazmamc.plazma
version = 1.20.1-R0.1-SNAPSHOT

paperCommit = b4e3b3d1dd447bac4cbf478595c1ec320bc6dd4b
paperCommit = 33bec7f20a5d3e20d9a8c0a16a1e5276add5d4fb

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0001-Pufferfish-API-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kevin Raneri <[email protected]>
Date: Tue, 9 Nov 2021 14:01:56 -0500
From: AlphaKR93 <[email protected]>
Date: Sat, 9 Sep 2023 16:24:45 +0000
Subject: [PATCH] Pufferfish API Changes

Original: Kevin Raneri <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0002-Purpur-API-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <[email protected]>
Date: Tue, 4 Jan 2022 23:05:41 -0600
From: AlphaKR93 <[email protected]>
Date: Sat, 9 Sep 2023 16:32:10 +0000
Subject: [PATCH] Purpur API Changes

Original: PurpurMC
Expand Down
44 changes: 34 additions & 10 deletions patches/server/0001-Pufferfish-Server-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kevin Raneri <[email protected]>
Date: Wed, 3 Feb 2021 23:02:38 -0600
From: AlphaKR93 <[email protected]>
Date: Sat, 9 Sep 2023 16:24:45 +0000
Subject: [PATCH] Pufferfish Server Changes

Original: Kevin Raneri <[email protected]>
Expand All @@ -16,6 +16,9 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

diff --git a/build.gradle.kts b/build.gradle.kts
index fb98936bb8a5488db75d676c5bcb4060597fbbf8..f6cd7b910ce41a254e71bf0fcfe93c38abbb1445 100644
--- a/build.gradle.kts
Expand Down Expand Up @@ -613,10 +616,10 @@ index 0000000000000000000000000000000000000000..020368da69b9a492155f6de6297f7473
+}
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..3d4bb28fe686a9ad2e4c0f75f21e6289c2ea5cf9
index 0000000000000000000000000000000000000000..95d1a8a5b349f7849c040026bfa3469d03d92bfd
--- /dev/null
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
@@ -0,0 +1,296 @@
@@ -0,0 +1,295 @@
+package gg.pufferfish.pufferfish;
+
+import gg.pufferfish.pufferfish.simd.SIMDDetection;
Expand Down Expand Up @@ -901,7 +904,6 @@ index 0000000000000000000000000000000000000000..3d4bb28fe686a9ad2e4c0f75f21e6289
+ "the ender dragon whenever a player places an end crystal.");
+ }
+
+
+ public static boolean disableMethodProfiler;
+ public static boolean disableOutOfOrderChat;
+ public static boolean suppressNullIdDisconnections;
Expand Down Expand Up @@ -2132,7 +2134,7 @@ index 9afc81ccb237c3655d64cdbe8a0db9a4d7791043..aa5cec6d56d7a8e80861aa4c9b4a74ca
private String descriptionId;
@Nullable
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index e11d7283662834047b2ff81a2fd25a4263792deb..e9a31314424d9db911cd9806741222397c3072d7 100644
index e11d7283662834047b2ff81a2fd25a4263792deb..e07140ef2f4c5b0019550eb3100c724699e7a05c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -142,7 +142,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
Expand All @@ -2148,11 +2150,11 @@ index e11d7283662834047b2ff81a2fd25a4263792deb..e9a31314424d9db911cd980674122239

if (!this.level().isClientSide) {
- if (this.isInWall()) {
+ if ((!gg.pufferfish.pufferfish.PufferfishConfig.enableSuffocationOptimization || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F))) && this.isInWall()) { // Pufferfish - optimize suffocation
+ if (shouldCheckForSuffocation() && this.isInWall()) { // Pufferfish - optimize suffocation
this.hurt(this.damageSources().inWall(), 1.0F);
} else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) {
double d0 = this.level().getWorldBorder().getDistanceToBorder(this) + this.level().getWorldBorder().getDamageSafeZone();
@@ -1369,6 +1368,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1369,6 +1368,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.getHealth() <= 0.0F;
}

Expand All @@ -2163,12 +2165,16 @@ index e11d7283662834047b2ff81a2fd25a4263792deb..e9a31314424d9db911cd980674122239
+ }
+ return true;
+ }
+
+ public boolean shouldCheckForSuffocation() {
+ return !gg.pufferfish.pufferfish.PufferfishConfig.enableSuffocationOptimization || (tickCount % 10 == 0 && couldPossiblyBeHurt(1.0F));
+ }
+ // Pufferfish end
+
@Override
public boolean hurt(DamageSource source, float amount) {
if (this.isInvulnerableTo(source)) {
@@ -1965,6 +1973,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1965,6 +1977,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.lastClimbablePos;
}

Expand All @@ -2189,7 +2195,7 @@ index e11d7283662834047b2ff81a2fd25a4263792deb..e9a31314424d9db911cd980674122239
public boolean onClimbable() {
if (this.isSpectator()) {
return false;
@@ -3651,7 +3673,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3651,7 +3677,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());

// Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists
Expand Down Expand Up @@ -2468,6 +2474,24 @@ index 247aca0b612f5079a0596350e8311c385df8ab1c..7f21d1d400c8a5615ed1a787dcb06803
this.getBrain().tick((ServerLevel) this.level(), this);
this.level().getProfiler().pop();
this.level().getProfiler().push("goatActivityUpdate");
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 1e07febcf7a3dfb281728cc5e3e4f15dd776d7e0..c65ab566c6241dd6a44bd11a449ef0c4b2f6dc65 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -150,6 +150,13 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
this.bossEvent.setName(this.getDisplayName());
}

+ // Pufferfish start - optimize suffocation
+ @Override
+ public boolean shouldCheckForSuffocation() {
+ return true;
+ }
+ // Pufferfish end
+
@Override
protected SoundEvent getAmbientSound() {
return SoundEvents.WITHER_AMBIENT;
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index 52196431a6538872755344859a0454a0e50c3b6e..80fc7918cb294b0d88a293bd6a920441cb55c3ad 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
Expand Down
Loading

0 comments on commit a76facf

Please sign in to comment.