Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@1004374a Add further information to thread check errors
PaperMC/Paper@e2f0efd1 Remove nms.Entity#isChunkLoaded
PaperMC/Paper@54b2e9d9 Add buffer to CraftWorld#warnUnsafeChunk
This commit is contained in:
granny
2025-01-29 15:02:05 -08:00
parent 9b57576430
commit 88ed744298
7 changed files with 23 additions and 49 deletions

View File

@@ -1,26 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Upstream Paper [rebuildPaperApiGeneratorPatches]" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="rebuildPaperApiGeneratorPatches" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2">
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Upstream Paper [applyAllPatches]" run_configuration_type="GradleRunConfiguration" />
</method>
</configuration>
</component>

View File

@@ -20,7 +20,7 @@
<DebugAllEnabled>false</DebugAllEnabled> <DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest> <RunAsTest>false</RunAsTest>
<method v="2"> <method v="2">
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Upstream Paper [rebuildPaperApiGeneratorPatches]" run_configuration_type="GradleRunConfiguration" /> <option name="RunConfigurationTask" enabled="true" run_configuration_name="Upstream Paper [applyAllPatches]" run_configuration_type="GradleRunConfiguration" />
</method> </method>
</configuration> </configuration>
</component> </component>

View File

@@ -2,7 +2,7 @@ group = org.purpurmc.purpur
version = 1.21.4-R0.1-SNAPSHOT version = 1.21.4-R0.1-SNAPSHOT
mcVersion = 1.21.4 mcVersion = 1.21.4
paperCommit = a392d475c28c62f25992de49d5d137b098e4ad92 paperCommit = 54b2e9d9738ce32e2f415c321f20e3fc07063c14
org.gradle.configuration-cache = true org.gradle.configuration-cache = true
org.gradle.caching = true org.gradle.caching = true

View File

@@ -42,7 +42,7 @@ index 5cf2c7f8fb05a91ed17f1d9c07f7d3e748738058..3770dc90d9412c6378c0bd57a651b9c3
public LevelChunk getChunkIfLoaded(int x, int z) { public LevelChunk getChunkIfLoaded(int x, int z) {
return this.chunkSource.getChunkAtIfLoadedImmediately(x, z); // Paper - Use getChunkIfLoadedImmediately return this.chunkSource.getChunkAtIfLoadedImmediately(x, z); // Paper - Use getChunkIfLoadedImmediately
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index 11b6149380ea6ca514a607801d499d740ce3d6dd..362e1bd5d19888535eb40f7ca7a9a5ef508f3c4a 100644 index a6f771cbee878eb383b67c61fa2469f2916413b5..d77381237f8a7d1b2f280a5032f5e1c8f0ab8f94 100644
--- a/net/minecraft/server/level/ServerPlayer.java --- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java
@@ -848,6 +848,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @@ -848,6 +848,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -75,10 +75,10 @@ index d681e14d33a8de6ca2c7f0a2e1ff9bb9d55adbbb..ee002c2cef9d4810fdacac71de77e948
if ((target instanceof Bucketable && target instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) { if ((target instanceof Bucketable && target instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
target.resendPossiblyDesyncedEntityData(ServerGamePacketListenerImpl.this.player); // Paper - The entire mob gets deleted, so resend it target.resendPossiblyDesyncedEntityData(ServerGamePacketListenerImpl.this.player); // Paper - The entire mob gets deleted, so resend it
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 474e5b8163e82a76aea8c4402d6acfcd366acaef..e4ee886f33ee63ae740cd89067c8ec81c12f2a62 100644 index 43a4427a8f327fbb224cb25e63a5c6b244eb9b09..62a38ecedbd579b32a8fd9cff5a433bfe635fc62 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -3155,6 +3155,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3151,6 +3151,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.passengers = ImmutableList.copyOf(list); this.passengers = ImmutableList.copyOf(list);
} }
@@ -92,7 +92,7 @@ index 474e5b8163e82a76aea8c4402d6acfcd366acaef..e4ee886f33ee63ae740cd89067c8ec81
this.gameEvent(GameEvent.ENTITY_MOUNT, passenger); this.gameEvent(GameEvent.ENTITY_MOUNT, passenger);
} }
} }
@@ -3196,6 +3203,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3192,6 +3199,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return false; return false;
} }
// CraftBukkit end // CraftBukkit end
@@ -107,7 +107,7 @@ index 474e5b8163e82a76aea8c4402d6acfcd366acaef..e4ee886f33ee63ae740cd89067c8ec81
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) { if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
this.passengers = ImmutableList.of(); this.passengers = ImmutableList.of();
} else { } else {
@@ -5119,4 +5134,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -5115,4 +5130,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return ((ServerLevel) this.level).isPositionEntityTicking(this.blockPosition()); return ((ServerLevel) this.level).isPositionEntityTicking(this.blockPosition());
} }
// Paper end - Expose entity id counter // Paper end - Expose entity id counter

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] API for any mob to burn daylight
Co-authored by: Encode42 <me@encode42.dev> Co-authored by: Encode42 <me@encode42.dev>
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index e4ee886f33ee63ae740cd89067c8ec81c12f2a62..f61c29abf75443b206f37b90950d6c0e14ea59ff 100644 index 62a38ecedbd579b32a8fd9cff5a433bfe635fc62..8473a7d9af9d83e97387ddf4cc50f6ad22730def 100644
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -534,6 +534,24 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -530,6 +530,24 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
// Purpur end - Add canSaveToDisk to Entity // Purpur end - Add canSaveToDisk to Entity
@@ -268,7 +268,7 @@ index 32b7c34d3c68dcfa936b628b2d038524204129a3..0ee817699fffbb929011465029182cc5
} }
diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java
index 5d12bc139c81ca342074c7c745635669020d0300..f8d41ce860c5f48ab9b5e4b79a554dab85d2ba9b 100644 index bb8c37c8348172947efe14d48ed9ae203409affa..b1da45df27f02395d793e7eafe576f5f92aa3a7b 100644
--- a/net/minecraft/world/entity/monster/Zombie.java --- a/net/minecraft/world/entity/monster/Zombie.java
+++ b/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java
@@ -89,11 +89,12 @@ public class Zombie extends Monster { @@ -89,11 +89,12 @@ public class Zombie extends Monster {

View File

@@ -40,7 +40,7 @@
public void inactiveTick() { public void inactiveTick() {
} }
@@ -526,10 +_,21 @@ @@ -522,10 +_,21 @@
} }
// Paper end - optimise entity tracker // Paper end - optimise entity tracker
@@ -62,7 +62,7 @@
this.position = Vec3.ZERO; this.position = Vec3.ZERO;
this.blockPosition = BlockPos.ZERO; this.blockPosition = BlockPos.ZERO;
this.chunkPosition = ChunkPos.ZERO; this.chunkPosition = ChunkPos.ZERO;
@@ -908,6 +_,7 @@ @@ -904,6 +_,7 @@
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v) && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
// Paper end - Configurable nether ceiling damage // Paper end - Configurable nether ceiling damage
@@ -70,7 +70,7 @@
this.onBelowWorld(); this.onBelowWorld();
} }
} }
@@ -1830,7 +_,7 @@ @@ -1826,7 +_,7 @@
} }
public boolean fireImmune() { public boolean fireImmune() {
@@ -79,7 +79,7 @@
} }
public boolean causeFallDamage(float fallDistance, float multiplier, DamageSource source) { public boolean causeFallDamage(float fallDistance, float multiplier, DamageSource source) {
@@ -1899,7 +_,7 @@ @@ -1895,7 +_,7 @@
return this.isInWater() || flag; return this.isInWater() || flag;
} }
@@ -88,7 +88,7 @@
if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) { if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) {
this.wasTouchingWater = false; this.wasTouchingWater = false;
} else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) { } else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) {
@@ -2525,6 +_,13 @@ @@ -2521,6 +_,13 @@
compound.putBoolean("Paper.FreezeLock", true); compound.putBoolean("Paper.FreezeLock", true);
} }
// Paper end // Paper end
@@ -102,7 +102,7 @@
return compound; return compound;
} catch (Throwable var9) { } catch (Throwable var9) {
CrashReport crashReport = CrashReport.forThrowable(var9, "Saving entity NBT"); CrashReport crashReport = CrashReport.forThrowable(var9, "Saving entity NBT");
@@ -2674,6 +_,13 @@ @@ -2670,6 +_,13 @@
freezeLocked = compound.getBoolean("Paper.FreezeLock"); freezeLocked = compound.getBoolean("Paper.FreezeLock");
} }
// Paper end // Paper end
@@ -116,7 +116,7 @@
} catch (Throwable var17) { } catch (Throwable var17) {
CrashReport crashReport = CrashReport.forThrowable(var17, "Loading entity NBT"); CrashReport crashReport = CrashReport.forThrowable(var17, "Loading entity NBT");
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded"); CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
@@ -2920,6 +_,7 @@ @@ -2916,6 +_,7 @@
if (this.isAlive() && this instanceof Leashable leashable) { if (this.isAlive() && this instanceof Leashable leashable) {
if (leashable.getLeashHolder() == player) { if (leashable.getLeashHolder() == player) {
if (!this.level().isClientSide()) { if (!this.level().isClientSide()) {
@@ -124,7 +124,7 @@
// CraftBukkit start - fire PlayerUnleashEntityEvent // CraftBukkit start - fire PlayerUnleashEntityEvent
// Paper start - Expand EntityUnleashEvent // Paper start - Expand EntityUnleashEvent
org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials()); org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials());
@@ -3245,15 +_,18 @@ @@ -3241,15 +_,18 @@
return Vec3.directionFromRotation(this.getRotationVector()); return Vec3.directionFromRotation(this.getRotationVector());
} }
@@ -144,7 +144,7 @@
} }
} }
} }
@@ -3458,7 +_,7 @@ @@ -3454,7 +_,7 @@
} }
public int getMaxAirSupply() { public int getMaxAirSupply() {
@@ -153,7 +153,7 @@
} }
public int getAirSupply() { public int getAirSupply() {
@@ -3953,7 +_,7 @@ @@ -3949,7 +_,7 @@
// CraftBukkit end // CraftBukkit end
public boolean canUsePortal(boolean allowPassengers) { public boolean canUsePortal(boolean allowPassengers) {
@@ -162,7 +162,7 @@
} }
public boolean canTeleport(Level fromLevel, Level toLevel) { public boolean canTeleport(Level fromLevel, Level toLevel) {
@@ -4485,6 +_,12 @@ @@ -4481,6 +_,12 @@
return Mth.lerp(partialTick, this.yRotO, this.yRot); return Mth.lerp(partialTick, this.yRotO, this.yRot);
} }
@@ -175,7 +175,7 @@
// Paper start - optimise collisions // Paper start - optimise collisions
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) { public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
if (this.touchingUnloadedChunk()) { if (this.touchingUnloadedChunk()) {
@@ -4883,7 +_,7 @@ @@ -4879,7 +_,7 @@
} }
public float maxUpStep() { public float maxUpStep() {

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2372,6 +_,50 @@ @@ -2373,6 +_,50 @@
return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight()); return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight());
} }