9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00
Files
LeavesMC/patches/server/0072-Enchantment-mending-compatibility-infinity.patch
2023-08-29 14:22:45 +08:00

19 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: violetc <58360096+s-yh-china@users.noreply.github.com>
Date: Tue, 27 Jun 2023 13:48:36 +0800
Subject: [PATCH] Enchantment mending compatibility infinity
diff --git a/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java b/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
index 518d85a13c37a2f7d32ca0718323181048559986..881d661326cbca3c5340a33a990f122737a37ef3 100644
--- a/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
+++ b/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
@@ -19,6 +19,6 @@ public class ArrowInfiniteEnchantment extends Enchantment {
@Override
public boolean checkCompatibility(Enchantment other) {
- return other instanceof MendingEnchantment ? false : super.checkCompatibility(other);
+ return (!top.leavesmc.leaves.LeavesConfig.mendingCompatibilityInfinity && other instanceof MendingEnchantment) ? false : super.checkCompatibility(other); // Leaves - mendingCompatibilityInfinity
}
}