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 3b08bf99de48b7af7c91de4b7448231ebe6819ae..46be66df0c6c31bff75bb31c005c1c1416c034fb 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java @@ -2117,12 +2117,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @Override public void crit(Entity entityHit) { - this.level().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 4)); + // Gale start - MultiPaper - broadcast crit animations as the entity being critted + var level = this.level(); + level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 4)); + // Gale end - MultiPaper - broadcast crit animations as the entity being critte } @Override public void magicCrit(Entity entityHit) { - this.level().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 5)); + // Gale start - MultiPaper - broadcast crit animations as the entity being critted + var level = this.level(); + 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