9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0077-Broadcast-crit-animations-as-the-entity-being-critte.patch
Dreeam c8ba5fedc8 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@9b1798d6 Simplify custom payload handling (#12347)
PaperMC/Paper@2552abf0 fix message mutation in PlayerSetSpawnEvent
PaperMC/Paper@ae99e24f fix deprecated bungee chat api methods
PaperMC/Paper@dca4aab8 add util methods to CraftChatMessage
PaperMC/Paper@87c9d9b0 be more lenient on url parsing for legacy format
PaperMC/Paper@4a9bd2e3 Correctly clear items in PlayerDeathEvent
PaperMC/Paper@a70f7745 fix unsaveable launched trident
PaperMC/Paper@41a094cf move block data/state impl
PaperMC/Paper@6b26b219 remove hardcoded durability from material
PaperMC/Paper@db8c646d Merge remote-tracking branch 'origin/main' into update/1.21.5
2025-03-31 09:53:16 -04:00

40 lines
2.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martijn Muijsers <martijnmuijsers@live.nl>
Date: Sun, 25 Dec 2022 23:33:28 +0100
Subject: [PATCH] Broadcast crit animations as the entity being critted
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
Gale - https://galemc.org
This patch is based on the following patch:
"Send crit animations as the entity being critted"
By: PureGero <puregero@gmail.com>
As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index 44ba108f99aa983d869ff87f95bb48867a83d392..7bb5d545155c2ffa7828488bc8b61c395fc17461 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -2044,12 +2044,18 @@ public class ServerPlayer extends Player {
@Override
public void crit(Entity entityHit) {
- this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 4));
+ // Gale start - MultiPaper - broadcast crit animations as the entity being critted
+ var level = this.serverLevel();
+ level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 4));
+ // Gale end - MultiPaper - broadcast crit animations as the entity being critted
}
@Override
public void magicCrit(Entity entityHit) {
- this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 5));
+ // Gale start - MultiPaper - broadcast crit animations as the entity being critted
+ var level = this.serverLevel();
+ level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 5));
+ // Gale end - MultiPaper - broadcast crit animations as the entity being critted
}
@Override