diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java
index febfa1df61..328db44cd3 100644
--- a/src/main/java/net/minecraft/server/ContainerAnvil.java
+++ b/src/main/java/net/minecraft/server/ContainerAnvil.java
@@ -196,6 +196,10 @@ public class ContainerAnvil extends Container {
                                 i3 = 1;
                             }
 
+                            if (flag) {
+                                i3 = Math.max(1, i3 / 2);
+                            }
+
                             i += i3 * k2;
                         }
                     }