Files
MiraiMC/patches/server/0056-lithium-entity.fast_hand_swing.patch
etil2jz ac9967167c Update Upstream (Pufferfish)
Also drop merged PRs and patches replaced by the new chunk system
2022-10-13 12:48:37 +02:00

22 lines
1004 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 dbcabd230bd9bd070e157f35d098553f3ed06987..2cd8dfe953ac72f6be14557ab39d3cec1108499e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2488,6 +2488,8 @@ public abstract class LivingEntity extends Entity {
}
protected void updateSwingTime() {
+ if (!this.swinging && this.swingTime == 0) return; // Mirai
+
int i = this.getCurrentSwingDuration();
if (this.swinging) {