9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-04 15:41:40 +00:00

fix MC-298464

This commit is contained in:
hayanesuru
2025-07-13 19:40:10 +09:00
parent 7bec64acc1
commit 2f72924ec7
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: hayanesuru <hayanesuru@outlook.jp>
Date: Sun, 13 Jul 2025 19:40:10 +0900
Subject: [PATCH] fix MC-298464
diff --git a/net/minecraft/world/damagesource/CombatTracker.java b/net/minecraft/world/damagesource/CombatTracker.java
index aa6213ca382e4901363317df1e30332c5166f271..03b7397b303c883b14fbac7759ff296c4e55d778 100644
--- a/net/minecraft/world/damagesource/CombatTracker.java
+++ b/net/minecraft/world/damagesource/CombatTracker.java
@@ -47,6 +47,7 @@ public class CombatTracker {
public void recordDamageAndCheckCombatState(final CombatEntry combatEntry) {
final DamageSource source = combatEntry.source();
// Paper end - Combat tracker API
+ if (org.dreeam.leaf.config.modules.fixes.MC298464.enabled) { this.entries.clear(); } // Leaf - Fix MC-298464
this.entries.add(combatEntry);
this.lastDamageTime = this.mob.tickCount;
this.takingDamage = true;

View File

@@ -0,0 +1,18 @@
package org.dreeam.leaf.config.modules.fixes;
import org.dreeam.leaf.config.ConfigModules;
import org.dreeam.leaf.config.EnumConfigCategory;
public class MC298464 extends ConfigModules {
public String getBasePath() {
return EnumConfigCategory.FIXES.getBaseKeyName();
}
public static boolean enabled = false;
@Override
public void onLoaded() {
enabled = config.getBoolean(getBasePath() + ".fix-mc298464", enabled);
}
}