From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Mon, 15 Jan 2024 20:47:05 +0800 Subject: [PATCH] Protection stacking diff --git a/src/main/java/net/minecraft/world/item/enchantment/ProtectionEnchantment.java b/src/main/java/net/minecraft/world/item/enchantment/ProtectionEnchantment.java index ba8bd0df934f28c5dae6fd8a85ec0b73f6d3aa31..cdb7dea2dc9fcafcdb7eaf8750a7c637bffc00e9 100644 --- a/src/main/java/net/minecraft/world/item/enchantment/ProtectionEnchantment.java +++ b/src/main/java/net/minecraft/world/item/enchantment/ProtectionEnchantment.java @@ -48,6 +48,11 @@ public class ProtectionEnchantment extends Enchantment { @Override public boolean checkCompatibility(Enchantment other) { + // Leaves start - protection stacking + if (top.leavesmc.leaves.LeavesConfig.protectionStacking) { + return super.checkCompatibility(other); + } + // Leaves end - protection stacking if (other instanceof ProtectionEnchantment protectionEnchantment) { if (this.type == protectionEnchantment.type) { return false;