mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-06-21 17:57:50 +02:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@7b66699b 26.2-rc-2 PaperMC/Paper@bb676e22 actual 26.2-rc-2 PaperMC/Paper@a737972b Fix isAllowedInPeaceful call PaperMC/Paper@c35810c3 Update deps to match Vanilla PaperMC/Paper@e5643cd4 Update Vex#getSummoner return type PaperMC/Paper@e00936a3 [ci/skip] update log4j for the api PaperMC/Paper@eb5df78f fix wither spawning parity and remove openSign var PaperMC/Paper@d1aca9a6 Apply most remaining feature patches
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -436,6 +_,9 @@
|
||||
@@ -441,6 +_,9 @@
|
||||
public boolean isRealPlayer; // Paper
|
||||
public com.destroystokyo.paper.event.entity.@Nullable PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||
public org.bukkit.event.player.PlayerQuitEvent.@Nullable 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
|
||||
@@ -8,9 +8,9 @@
|
||||
+ private boolean compassBar = false; // Purpur - Add compass command
|
||||
+ private boolean ramBar = false; // Purpur - Implement rambar commands
|
||||
|
||||
public ServerPlayer(final MinecraftServer server, final ServerLevel level, final GameProfile gameProfile, final ClientInformation clientInformation) {
|
||||
super(level, gameProfile);
|
||||
@@ -480,6 +_,9 @@
|
||||
// Paper start - rewrite chunk system
|
||||
private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
|
||||
@@ -515,6 +_,9 @@
|
||||
this.respawnConfig = input.read("respawn", ServerPlayer.RespawnConfig.CODEC).orElse(null);
|
||||
this.spawnExtraParticlesOnFall = input.getBooleanOr("spawn_extra_particles_on_fall", false);
|
||||
this.raidOmenPosition = input.read("raid_omen_position", BlockPos.CODEC).orElse(null);
|
||||
@@ -20,7 +20,7 @@
|
||||
// Paper start - Expand PlayerGameModeChangeEvent
|
||||
this.loadGameTypes(input);
|
||||
}
|
||||
@@ -522,6 +_,9 @@
|
||||
@@ -557,6 +_,9 @@
|
||||
output.store("ShoulderEntityRight", CompoundTag.CODEC, this.getShoulderEntityRight());
|
||||
}
|
||||
this.getBukkitEntity().setExtraData(output); // CraftBukkit
|
||||
@@ -30,15 +30,15 @@
|
||||
}
|
||||
|
||||
private void saveParentVehicle(final ValueOutput playerOutput) {
|
||||
@@ -1158,6 +_,7 @@
|
||||
@@ -1194,6 +_,7 @@
|
||||
// Paper - moved up to sendClientboundPlayerCombatKillPacket()
|
||||
sendClientboundPlayerCombatKillPacket(event.getShowDeathMessages(), deathScreenMessage); // Paper - Expand PlayerDeathEvent
|
||||
this.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) {
|
||||
@@ -1267,6 +_,13 @@
|
||||
@@ -1303,6 +_,13 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
Entity entity = source.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))
|
||||
@@ -1508,7 +_,7 @@
|
||||
@@ -1544,7 +_,7 @@
|
||||
}
|
||||
|
||||
if (newLevel.dimension() == lastDimension) {
|
||||
@@ -61,7 +61,7 @@
|
||||
this.connection.resetPosition();
|
||||
transition.postTeleportTransition().onTransition(this);
|
||||
return this;
|
||||
@@ -1531,6 +_,7 @@
|
||||
@@ -1567,6 +_,7 @@
|
||||
|
||||
profiler.pop();
|
||||
profiler.push("placing");
|
||||
@@ -69,7 +69,7 @@
|
||||
this.setServerLevel(newLevel);
|
||||
this.connection.internalTeleport(PositionMoveRotation.of(transition), transition.relatives()); // CraftBukkit - use internal teleport without event
|
||||
this.connection.resetPosition();
|
||||
@@ -1643,7 +_,7 @@
|
||||
@@ -1679,7 +_,7 @@
|
||||
new AABB(bedCenter.x() - 8.0, bedCenter.y() - 5.0, bedCenter.z() - 8.0, bedCenter.x() + 8.0, bedCenter.y() + 5.0, bedCenter.z() + 8.0),
|
||||
monster -> monster.isPreventingPlayerRest(this.level(), this)
|
||||
);
|
||||
@@ -78,7 +78,7 @@
|
||||
return Either.left(Player.BedSleepingProblem.NOT_SAFE);
|
||||
}
|
||||
}
|
||||
@@ -1679,7 +_,17 @@
|
||||
@@ -1715,7 +_,17 @@
|
||||
CriteriaTriggers.SLEPT_IN_BED.trigger(this);
|
||||
});
|
||||
if (!this.level().canSleepThroughNights()) {
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
|
||||
this.level().updateSleepingPlayerList();
|
||||
@@ -1774,6 +_,7 @@
|
||||
@@ -1810,6 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void openTextEdit(final SignBlockEntity sign, final boolean isFrontText) {
|
||||
@@ -105,7 +105,7 @@
|
||||
this.connection.send(new ClientboundBlockUpdatePacket(this.level(), sign.getBlockPos()));
|
||||
this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos(), isFrontText));
|
||||
}
|
||||
@@ -2118,6 +_,26 @@
|
||||
@@ -2154,6 +_,26 @@
|
||||
this.lastSentExp = -1; // CraftBukkit - Added to reset
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
@Override
|
||||
public void completeUsingItem() {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
@@ -2355,6 +_,20 @@
|
||||
@@ -2391,6 +_,20 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
@Override
|
||||
public void sendSystemMessage(final Component message) {
|
||||
this.sendSystemMessage(message, false);
|
||||
@@ -2506,7 +_,67 @@
|
||||
@@ -2542,7 +_,67 @@
|
||||
|
||||
public void resetLastActionTime() {
|
||||
this.lastActionTime = Util.getMillis();
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
public ServerStatsCounter getStats() {
|
||||
return this.stats;
|
||||
@@ -3131,4 +_,65 @@
|
||||
@@ -3167,4 +_,65 @@
|
||||
return (org.bukkit.craftbukkit.entity.CraftPlayer) super.getBukkitEntity();
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
Reference in New Issue
Block a user