From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Martijn Muijsers 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 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