Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@42a2a6c2 Supports the ability for commands to be registered internally (#12520)
PaperMC/Paper@753cff7c Improvements for Dump paper commands (#12512)
PaperMC/Paper@e2da5d2f Registry API for supported Mob Variants (#12417)
PaperMC/Paper@ab0253fe Expand PlayerDeathEvent API (#12221)
PaperMC/Paper@cbcf75a5 Update visual fire handling with TriState support (#12303)
PaperMC/Paper@6c3964d2 Properly save level data async (#12530)
PaperMC/Paper@d2ad2e66 Add missing EntityLookup#getAllMapped from Moonrise
This commit is contained in:
granny
2025-05-08 22:08:56 -07:00
parent a9fe4f2597
commit 9d0aa8ebde
11 changed files with 43 additions and 43 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -428,6 +_,10 @@
@@ -427,6 +_,10 @@
public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
public @Nullable String clientBrandName = null; // Paper - Brand support
public @Nullable org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event
@@ -11,7 +11,7 @@
// Paper start - rewrite chunk system
private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
@@ -561,6 +_,10 @@
@@ -560,6 +_,10 @@
this.respawnConfig = compound.read("respawn", ServerPlayer.RespawnConfig.CODEC).orElse(null);
this.spawnExtraParticlesOnFall = compound.getBooleanOr("spawn_extra_particles_on_fall", false);
this.raidOmenPosition = compound.read("raid_omen_position", BlockPos.CODEC).orElse(null);
@@ -22,7 +22,7 @@
}
@Override
@@ -578,6 +_,9 @@
@@ -577,6 +_,9 @@
compound.storeNullable("raid_omen_position", BlockPos.CODEC, this.raidOmenPosition);
this.saveEnderPearls(compound);
this.getBukkitEntity().setExtraData(compound); // CraftBukkit
@@ -32,15 +32,15 @@
}
private void saveParentVehicle(CompoundTag tag) {
@@ -1060,6 +_,7 @@
)
);
@@ -1070,6 +_,7 @@
// Paper - moved up to sendClientboundPlayerCombatKillPacket()
sendClientboundPlayerCombatKillPacket(event.getShowDeathMessages(), deathScreenMessage); // Paper - Expand PlayerDeathEvent
Team team = this.getTeam();
+ if (org.purpurmc.purpur.PurpurConfig.deathMessageOnlyBroadcastToAffectedPlayer) this.sendSystemMessage(deathMessage); else // Purpur - Configurable broadcast settings
if (team == null || team.getDeathMessageVisibility() == Team.Visibility.ALWAYS) {
this.server.getPlayerList().broadcastSystemMessage(deathMessage, false);
} else if (team.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) {
@@ -1166,6 +_,13 @@
@@ -1176,6 +_,13 @@
if (this.isInvulnerableTo(level, damageSource)) {
return false;
} else {
@@ -54,7 +54,7 @@
Entity entity = damageSource.getEntity();
if (!( // Paper - split the if statement. If below statement is false, hurtServer would not have been evaluated. Return false.
!(entity instanceof Player player && !this.canHarmPlayer(player))
@@ -1392,6 +_,7 @@
@@ -1402,6 +_,7 @@
serverLevel.removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
this.unsetRemoved();
// CraftBukkit end
@@ -62,7 +62,7 @@
this.setServerLevel(level);
this.connection.internalTeleport(PositionMoveRotation.of(teleportTransition), teleportTransition.relatives()); // CraftBukkit - use internal teleport without event
this.connection.resetPosition();
@@ -1509,7 +_,7 @@
@@ -1519,7 +_,7 @@
new AABB(vec3.x() - 8.0, vec3.y() - 5.0, vec3.z() - 8.0, vec3.x() + 8.0, vec3.y() + 5.0, vec3.z() + 8.0),
monster -> monster.isPreventingPlayerRest(this.serverLevel(), this)
);
@@ -71,7 +71,7 @@
return Either.left(Player.BedSleepingProblem.NOT_SAFE);
}
}
@@ -1546,7 +_,19 @@
@@ -1556,7 +_,19 @@
CriteriaTriggers.SLEPT_IN_BED.trigger(this);
});
if (!this.serverLevel().canSleepThroughNights()) {
@@ -92,7 +92,7 @@
}
((ServerLevel)this.level()).updateSleepingPlayerList();
@@ -1638,6 +_,7 @@
@@ -1648,6 +_,7 @@
@Override
public void openTextEdit(SignBlockEntity signEntity, boolean isFrontText) {
@@ -100,7 +100,7 @@
this.connection.send(new ClientboundBlockUpdatePacket(this.level(), signEntity.getBlockPos()));
this.connection.send(new ClientboundOpenSignEditorPacket(signEntity.getBlockPos(), isFrontText));
}
@@ -1940,6 +_,26 @@
@@ -1950,6 +_,26 @@
this.lastSentExp = -1; // CraftBukkit - Added to reset
}
@@ -127,7 +127,7 @@
@Override
public void displayClientMessage(Component chatComponent, boolean actionBar) {
this.sendSystemMessage(chatComponent, actionBar);
@@ -2157,6 +_,20 @@
@@ -2167,6 +_,20 @@
);
}
@@ -148,7 +148,7 @@
public void sendSystemMessage(Component mesage) {
this.sendSystemMessage(mesage, false);
}
@@ -2295,7 +_,67 @@
@@ -2305,7 +_,67 @@
public void resetLastActionTime() {
this.lastActionTime = Util.getMillis();
@@ -217,7 +217,7 @@
public ServerStatsCounter getStats() {
return this.stats;
@@ -2923,4 +_,56 @@
@@ -2933,4 +_,56 @@
return (org.bukkit.craftbukkit.entity.CraftPlayer) super.getBukkitEntity();
}
// CraftBukkit end