mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@102c8bbc Add config for updating equipment on player actions (#12275) PaperMC/Paper@f0388e2f Call EntityPushedByEntityAttackEvent for Mace AoE (#12257) PaperMC/Paper@c37b890c More deferred requireNonNull message creation PaperMC/Paper@310f5229 Add unsupported config option and internal API to simplify remote item matching PaperMC/Paper@6ea42025 Send all attributes on respawn (#12274)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -393,6 +_,10 @@
|
||||
@@ -400,6 +_,10 @@
|
||||
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||
public @Nullable String clientBrandName = null; // Paper - Brand support
|
||||
public 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 @@
|
||||
@@ -568,6 +_,10 @@
|
||||
if (tag != null) {
|
||||
BlockPos.CODEC.parse(NbtOps.INSTANCE, tag).resultOrPartial(LOGGER::error).ifPresent(pos -> this.raidOmenPosition = pos);
|
||||
}
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -605,6 +_,9 @@
|
||||
@@ -612,6 +_,9 @@
|
||||
}
|
||||
|
||||
this.saveEnderPearls(compound);
|
||||
@@ -32,7 +32,7 @@
|
||||
}
|
||||
|
||||
private void saveParentVehicle(CompoundTag tag) {
|
||||
@@ -1124,6 +_,7 @@
|
||||
@@ -1131,6 +_,7 @@
|
||||
)
|
||||
);
|
||||
Team team = this.getTeam();
|
||||
@@ -40,7 +40,7 @@
|
||||
if (team == null || team.getDeathMessageVisibility() == Team.Visibility.ALWAYS) {
|
||||
this.server.getPlayerList().broadcastSystemMessage(deathMessage, false);
|
||||
} else if (team.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) {
|
||||
@@ -1217,6 +_,13 @@
|
||||
@@ -1224,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))
|
||||
@@ -1446,6 +_,7 @@
|
||||
@@ -1453,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();
|
||||
@@ -1564,7 +_,7 @@
|
||||
@@ -1571,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);
|
||||
}
|
||||
}
|
||||
@@ -1601,7 +_,19 @@
|
||||
@@ -1608,7 +_,19 @@
|
||||
CriteriaTriggers.SLEPT_IN_BED.trigger(this);
|
||||
});
|
||||
if (!this.serverLevel().canSleepThroughNights()) {
|
||||
@@ -92,7 +92,7 @@
|
||||
}
|
||||
|
||||
((ServerLevel)this.level()).updateSleepingPlayerList();
|
||||
@@ -1709,6 +_,7 @@
|
||||
@@ -1716,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));
|
||||
}
|
||||
@@ -2014,6 +_,26 @@
|
||||
@@ -2021,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);
|
||||
@@ -2235,6 +_,20 @@
|
||||
@@ -2242,6 +_,20 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
public void sendSystemMessage(Component mesage) {
|
||||
this.sendSystemMessage(mesage, false);
|
||||
}
|
||||
@@ -2373,7 +_,67 @@
|
||||
@@ -2380,7 +_,67 @@
|
||||
|
||||
public void resetLastActionTime() {
|
||||
this.lastActionTime = Util.getMillis();
|
||||
@@ -217,7 +217,7 @@
|
||||
|
||||
public ServerStatsCounter getStats() {
|
||||
return this.stats;
|
||||
@@ -3078,4 +_,56 @@
|
||||
@@ -3085,4 +_,56 @@
|
||||
return (org.bukkit.craftbukkit.entity.CraftPlayer) super.getBukkitEntity();
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
Reference in New Issue
Block a user