mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Add Fix MC-26678
This commit is contained in:
52
patches/server/0051-Fix-MC-26678.patch
Normal file
52
patches/server/0051-Fix-MC-26678.patch
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
||||||
|
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;
|
||||||
|
+}
|
||||||
Reference in New Issue
Block a user