From ff5c3cdd454de90e4106e4f7465c9fd664a72141 Mon Sep 17 00:00:00 2001 From: Steven M Date: Thu, 26 Jul 2018 17:35:53 +0200 Subject: [PATCH] Fix books changing metadata by serialization (#165) Fixes #164 --- src/main/java/de/epiceric/shopchest/utils/Utils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/de/epiceric/shopchest/utils/Utils.java b/src/main/java/de/epiceric/shopchest/utils/Utils.java index 51d9f97..f46c328 100644 --- a/src/main/java/de/epiceric/shopchest/utils/Utils.java +++ b/src/main/java/de/epiceric/shopchest/utils/Utils.java @@ -63,6 +63,9 @@ public class Utils { itemStack1.setItemMeta(bookMeta1); itemStack2.setItemMeta(bookMeta2); + + itemStack1 = decode(encode(itemStack1)); + itemStack2 = decode(encode(itemStack2)); } return itemStack1.isSimilar(itemStack2);