mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b16c0ae Add offline PDC API (#8117) PaperMC/Paper@4430e96 Add AnvilView#bypassEnchantmentLevelRestriction (#11475)
This commit is contained in:
@@ -27,10 +27,10 @@ index 99695e38b6a10c3cffda6e453f9f0619c7406cc0..2283f69607cb769545c85bcae940ac95
|
||||
i++;
|
||||
} else if (targets.size() == 1) {
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
index 3cdadb7028de83d3c2a939ba883061171137a620..e3c74f30eabfcbeef43a7a8096191e4bf4349c9a 100644
|
||||
index 58135a3292bcdfea17726f17d86192ced96eea9a..29e54876c22739f45565cd91bcbd76612e8bfad1 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
@@ -231,7 +231,10 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
@@ -232,7 +232,10 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
|
||||
i2 = l1 == i2 ? i2 + 1 : Math.max(i2, l1);
|
||||
Enchantment enchantment = (Enchantment) holder.value();
|
||||
@@ -42,7 +42,7 @@ index 3cdadb7028de83d3c2a939ba883061171137a620..e3c74f30eabfcbeef43a7a8096191e4b
|
||||
|
||||
if (this.player.getAbilities().instabuild || itemstack.is(Items.ENCHANTED_BOOK)) {
|
||||
flag3 = true;
|
||||
@@ -243,16 +246,22 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
@@ -244,16 +247,22 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
Holder<Enchantment> holder1 = (Holder) iterator1.next();
|
||||
|
||||
if (!holder1.equals(holder) && !Enchantment.areCompatible(holder, holder1)) {
|
||||
@@ -63,12 +63,12 @@ index 3cdadb7028de83d3c2a939ba883061171137a620..e3c74f30eabfcbeef43a7a8096191e4b
|
||||
flag2 = true;
|
||||
} else {
|
||||
flag1 = true;
|
||||
- if (i2 > enchantment.getMaxLevel()) {
|
||||
+ if (!org.purpurmc.purpur.PurpurConfig.allowHigherEnchantsLevels && i2 > enchantment.getMaxLevel()) { // Purpur - Config to allow unsafe enchants
|
||||
- if (i2 > enchantment.getMaxLevel() && !this.bypassEnchantmentLevelRestriction) { // Paper - bypass anvil level restrictions
|
||||
+ if (!org.purpurmc.purpur.PurpurConfig.allowHigherEnchantsLevels && i2 > enchantment.getMaxLevel() && !this.bypassEnchantmentLevelRestriction) { // Paper - bypass anvil level restrictions // Purpur - Config to allow unsafe enchants
|
||||
i2 = enchantment.getMaxLevel();
|
||||
}
|
||||
|
||||
@@ -378,7 +387,7 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
@@ -379,7 +388,7 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
this.broadcastChanges();
|
||||
|
||||
// Purpur start - Anvil API
|
||||
|
||||
Reference in New Issue
Block a user