mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
20 lines
1.1 KiB
Diff
20 lines
1.1 KiB
Diff
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 2346e1fc0c94084c3bb95c00be8aac36ae5f26ae..fa5fb93e2d3abd7171f4f7db9a74d42ec37b8ecd 100644
|
|
--- a/net/minecraft/world/inventory/AnvilMenu.java
|
|
+++ b/net/minecraft/world/inventory/AnvilMenu.java
|
|
@@ -266,7 +266,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;
|
|
}
|
|
|