From f10c9861369d5ecbad793f5e5be3638bc975a22f Mon Sep 17 00:00:00 2001 From: feildmaster Date: Thu, 24 Jan 2013 18:10:03 -0600 Subject: [PATCH] Properly calculate level cost for books. Fixes BUKKIT-3410 --- src/main/java/net/minecraft/server/ContainerAnvil.java | 4 ++++ 1 file changed, 4 insertions(+) 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; } }