Skip to content

Commit

Permalink
Add Fix MC-26678
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Jul 19, 2024
1 parent 1130668 commit f01d66d
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions patches/server/0051-Fix-MC-26678.patch
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;
+}

0 comments on commit f01d66d

Please sign in to comment.