mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-22 16:29:23 +00:00
29 lines
1.6 KiB
Diff
29 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
Date: Sat, 13 Jan 2024 20:37:54 +0300
|
|
Subject: [PATCH] lithium: entity.fast_elytra_check + entity.fast_hand_swing
|
|
|
|
Original code by CaffeineMC, licensed under LGPL v3
|
|
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 84ac9ee926a9a4b4d2dcd107cb089162637a2576..012ab9befd112e26d5f593cac1dba8592c0b0021 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -2832,6 +2832,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) {
|
|
@@ -3878,6 +3879,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
protected void updateFallFlying() {
|
|
this.checkSlowFallDistance();
|
|
if (!this.level().isClientSide) {
|
|
+ if (!this.isFallFlying() && this.fallFlyTicks == 0) return; // DivineMC - lithium: entity.fast_elytra_check
|
|
if (!this.canGlide()) {
|
|
if (this.getSharedFlag(7) != false && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit
|
|
this.setSharedFlag(7, false);
|