mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-22 08:19:31 +00:00
52 lines
3.3 KiB
Diff
52 lines
3.3 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/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
index e00fa5dfc9e74bcd784fe95a7430c59d3b00c937..3049e4c011df8cb620d3fa981882be697f67e4ce 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -1914,12 +1914,18 @@ public class ServerPlayer extends Player {
|
|
|
|
@Override
|
|
public void crit(Entity target) {
|
|
- this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(target, 4));
|
|
+ // Gale start - MultiPaper - broadcast crit animations as the entity being critted
|
|
+ var level = this.serverLevel();
|
|
+ level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? target : this, new ClientboundAnimatePacket(target, 4));
|
|
+ // Gale end - MultiPaper - broadcast crit animations as the entity being critted
|
|
}
|
|
|
|
@Override
|
|
public void magicCrit(Entity target) {
|
|
- this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(target, 5));
|
|
+ // Gale start - MultiPaper - broadcast crit animations as the entity being critted
|
|
+ var level = this.serverLevel();
|
|
+ level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? target : this, new ClientboundAnimatePacket(target, 5));
|
|
+ // Gale end - MultiPaper - broadcast crit animations as the entity being critted
|
|
}
|
|
|
|
@Override
|
|
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
index 3bcfcbb9bf085192c55aae58ddb231fb18dcabcd..6c9eacf9b4ec0a2eead062bd69a037c5c2d8722f 100644
|
|
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
@@ -108,6 +108,7 @@ public class GaleWorldConfiguration extends ConfigurationPart {
|
|
|
|
public boolean sandDuping = true; // Gale - Purpur - make sand duping fix configurable
|
|
public boolean tripwireDuping = true; // Gale - Leaf - make tripwire duping fix configurable
|
|
+ public boolean broadcastCritAnimationsAsTheEntityBeingCritted = false; // Gale - MultiPaper - broadcast crit animations as the entity being critted
|
|
public boolean keepMooshroomRotationAfterShearing = true; // Gale - Purpur - fix cow rotation when shearing mooshroom
|
|
public boolean checkCanChangeDimensionsBeforeUseEndGateway = false; // Gale - Purpur - end gateway should check if entity can use portal
|
|
|