9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-21 15:59:23 +00:00
Files
DivineMC/patches/server/0040-lithium-entity.fast_hand_swing.patch
2023-01-08 12:29:20 +03:00

22 lines
1007 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: 2No2Name <2No2Name@web.de>
Date: Sun, 9 Jan 2022 06:03:28 +0100
Subject: [PATCH] lithium: entity.fast_hand_swing
Original code by CaffeineMC, licensed under GNU Lesser General Public License v3.0
You can find the original code on https://github.com/CaffeineMC/lithium-fabric (Yarn mappings)
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 577e6744eab8e01a1fab414e53c2263f1997def5..f24b8baf01c4e25c0ddff6f7726d1ac6d5345930 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2519,6 +2519,8 @@ public abstract class LivingEntity extends Entity {
}
protected void updateSwingTime() {
+ if (!this.swinging && this.swingTime == 0) return; // DivineMC
+
int i = this.getCurrentSwingDuration();
if (this.swinging) {