-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1130668
commit f01d66d
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Dreeam <[email protected]> | ||
Date: Sat, 20 Jul 2024 05:28:12 +0800 | ||
Subject: [PATCH] Fix MC-26678 | ||
|
||
Original license: MIT | ||
Original project: https://github.com/545u/OldDamageTilt | ||
|
||
Mojang issues: https://bugs.mojang.com/browse/MC-172047 | ||
|
||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java | ||
index 152d0219c4da3a68e331771c336d8c9423081557..52627656dd506aa9fbc7b8070d6e4bdf4b033ba6 100644 | ||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java | ||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java | ||
@@ -2482,7 +2482,9 @@ public abstract class Player extends LivingEntity { | ||
|
||
@Override | ||
public float getHurtDir() { | ||
- return this.hurtDir; | ||
+ return org.dreeam.leaf.config.modules.fixes.FixMC26678.enabled | ||
+ ? this.hurtDir | ||
+ : 0.0F; | ||
} | ||
|
||
@Override | ||
diff --git a/src/main/java/org/dreeam/leaf/config/modules/fixes/FixMC26678.java b/src/main/java/org/dreeam/leaf/config/modules/fixes/FixMC26678.java | ||
new file mode 100644 | ||
index 0000000000000000000000000000000000000000..cdf992d47afd524b6b36f6befddeefe2cdf66265 | ||
--- /dev/null | ||
+++ b/src/main/java/org/dreeam/leaf/config/modules/fixes/FixMC26678.java | ||
@@ -0,0 +1,21 @@ | ||
+package org.dreeam.leaf.config.modules.fixes; | ||
+ | ||
+import org.dreeam.leaf.config.ConfigInfo; | ||
+import org.dreeam.leaf.config.EnumConfigCategory; | ||
+import org.dreeam.leaf.config.IConfigModule; | ||
+ | ||
+public class FixMC26678 implements IConfigModule { | ||
+ | ||
+ @Override | ||
+ public EnumConfigCategory getCategory() { | ||
+ return EnumConfigCategory.FIXES; | ||
+ } | ||
+ | ||
+ @Override | ||
+ public String getBaseName() { | ||
+ return "fix_MC_26678"; | ||
+ } | ||
+ | ||
+ @ConfigInfo(baseName = "enabled", comments = "Disable it to makes damage tilt toward left, to use old damage tilt") | ||
+ public static boolean enabled = true; | ||
+} |