mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 12dec20 Bump paerweight to 1.1.7 e33ed89 Get short commit ref using a more proper method 7d6147d Remove now unneeded patch due to paperweight 1.1.7 e72fa41 Update task dependency for includeMappings so the new task isn't skipped 0ad5526 Trim whitspace off of git hash (oops) Tuinity Changes: e878ba9 Update paper 2bd2849 Bring back fix codec spam patch
40 lines
2.3 KiB
Diff
40 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Tue, 13 Oct 2020 20:04:33 -0500
|
|
Subject: [PATCH] Allow infinite and mending enchantments together
|
|
|
|
|
|
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 3aece8245060dd1ba269c08d226c84247a6f0a83..6763d0b96c83d1b462999f525bf1f31c30cf705f 100644
|
|
--- a/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
|
|
+++ b/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
|
|
@@ -24,6 +24,6 @@ public class ArrowInfiniteEnchantment extends Enchantment {
|
|
|
|
@Override
|
|
public boolean checkCompatibility(Enchantment other) {
|
|
- return other instanceof MendingEnchantment ? false : super.checkCompatibility(other);
|
|
+ return other instanceof MendingEnchantment ? net.pl3x.purpur.PurpurConfig.allowInfinityMending : super.checkCompatibility(other);
|
|
}
|
|
}
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index c620ce09ae3e10f2a28ca4301eab6ce0b4f59558..ceac3e7217965392357ae490a9e0243f97f1b421 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -314,6 +314,16 @@ public class PurpurConfig {
|
|
cryingObsidianValidForPortalFrame = getBoolean("settings.blocks.crying_obsidian.valid-for-portal-frame", cryingObsidianValidForPortalFrame);
|
|
}
|
|
|
|
+ public static boolean allowInfinityMending = false;
|
|
+ private static void enchantmentSettings() {
|
|
+ if (version < 5) {
|
|
+ boolean oldValue = getBoolean("settings.enchantment.allow-infinite-and-mending-together", false);
|
|
+ set("settings.enchantment.allow-infinity-and-mending-together", oldValue);
|
|
+ set("settings.enchantment.allow-infinite-and-mending-together", null);
|
|
+ }
|
|
+ allowInfinityMending = getBoolean("settings.enchantment.allow-infinity-and-mending-together", allowInfinityMending);
|
|
+ }
|
|
+
|
|
public static boolean endermanShortHeight = false;
|
|
private static void entitySettings() {
|
|
endermanShortHeight = getBoolean("settings.entity.enderman.short-height", endermanShortHeight);
|