9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-22 08:29:28 +00:00
Files
Leaf/patches/server/0137-DivineMC-Lithium-entity.fast_elytra_check-entity.fas.patch
Kobe ⑧ 848fb2dc4d Smart sorting & Remove streams & Throttle hopper (#157)
* =-=

* Reuse comparator

* Cleanup DAB patch
2024-11-10 09:25:58 -05:00

33 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kidofcubes <kidofcubes@gmail.com>
Date: Fri, 8 Nov 2024 00:22:44 +0800
Subject: [PATCH] DivineMC - Lithium: entity.fast_elytra_check +
entity.fast_hand_swing
Original license: GPL v3
Original project: https://github.com/DivineMC/DivineMC
Original license: LGPL v3
Original project: https://github.com/CaffeineMC/lithium-fabric
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 241e2598973939b7d19768cd9ca7cd8f3818c053..ac3ef40aabf08081efd28dd30c0c856d1858c44f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2769,6 +2769,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
protected void updateSwingTime() {
+ if (!this.swinging && this.swingTime == 0) return; // DivineMC - Lithium: entity.fast_hand_swing
int i = this.getCurrentSwingDuration();
if (this.swinging) {
@@ -3747,6 +3748,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
private void updateFallFlying() {
+ if (!this.isFallFlying()) return; // DivineMC - Lithium: entity.fast_elytra_check
boolean flag = this.getSharedFlag(7);
if (flag && !this.onGround() && !this.isPassenger() && !this.hasEffect(MobEffects.LEVITATION)) {