mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 5b123cd1 [CI-SKIP] [Auto] Rebuild Patches becb478c Add ignore discounts API 9e90c15f Add custom ranges to beacons 068313fa Item no age & no player pickup 1b3c20f9 Fix client lag on advancement loading (#4710) c596edb1 [CI-SKIP] Update IRC information in readme and config (#4751) a936a413 [Auto] Updated Upstream (Bukkit)
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
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/server/EnchantmentInfiniteArrows.java b/src/main/java/net/minecraft/server/EnchantmentInfiniteArrows.java
|
||||
index 408cfa460..3d4e34f70 100644
|
||||
--- a/src/main/java/net/minecraft/server/EnchantmentInfiniteArrows.java
|
||||
+++ b/src/main/java/net/minecraft/server/EnchantmentInfiniteArrows.java
|
||||
@@ -23,6 +23,6 @@ public class EnchantmentInfiniteArrows extends Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean a(Enchantment enchantment) {
|
||||
- return enchantment instanceof EnchantmentMending ? false : super.a(enchantment);
|
||||
+ return enchantment instanceof EnchantmentMending ? net.pl3x.purpur.PurpurConfig.allowInfinityMending : super.a(enchantment); // Purpur
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index d33d24af6..418fc8390 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -55,8 +55,8 @@ public class PurpurConfig {
|
||||
commands = new HashMap<>();
|
||||
commands.put("purpur", new PurpurCommand("purpur"));
|
||||
|
||||
- version = getInt("config-version", 4);
|
||||
- set("config-version", 4);
|
||||
+ version = getInt("config-version", 5);
|
||||
+ set("config-version", 5);
|
||||
|
||||
readConfig(PurpurConfig.class, null);
|
||||
}
|
||||
@@ -194,6 +194,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);
|
||||
Reference in New Issue
Block a user