From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:16:25 +0800 Subject: [PATCH] Avoid anvil too expensive diff --git a/net/minecraft/world/inventory/AnvilMenu.java b/net/minecraft/world/inventory/AnvilMenu.java index 9a3887752aa4b39224c9bf6e6145e20fa6962439..a7f84100b350b097d33b571be65296fe76d13e82 100644 --- a/net/minecraft/world/inventory/AnvilMenu.java +++ b/net/minecraft/world/inventory/AnvilMenu.java @@ -268,7 +268,7 @@ public class AnvilMenu extends ItemCombinerMenu { this.onlyRenaming = true; } - if (this.cost.get() >= this.maximumRepairCost && !this.player.hasInfiniteMaterials()) { // CraftBukkit + if (this.cost.get() >= this.maximumRepairCost && (!org.leavesmc.leaves.LeavesConfig.modify.avoidAnvilTooExpensive || this.cost.get() == DEFAULT_DENIED_COST) && !this.player.hasInfiniteMaterials()) { // CraftBukkit // Leaves - avoid anvil too expensive itemStack = ItemStack.EMPTY; }