-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enchantment mending compatibility infinity (#29)
- Loading branch information
1 parent
4e00b39
commit cfc314c
Showing
2 changed files
with
25 additions
and
2 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
18 changes: 18 additions & 0 deletions
18
patches/server/0073-Enchantment-mending-compatibility-infinity.patch
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,18 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: violetc <[email protected]> | ||
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 | ||
} | ||
} |