From 334219cbe11b63040d8e995f9db95b9368776d3c Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 13 Nov 2016 14:00:07 +0100 Subject: [PATCH] Fixed issue with BlockStateMeta --- src/main/java/de/epiceric/shopchest/utils/Utils.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/epiceric/shopchest/utils/Utils.java b/src/main/java/de/epiceric/shopchest/utils/Utils.java index 814c2ed..a59cc29 100644 --- a/src/main/java/de/epiceric/shopchest/utils/Utils.java +++ b/src/main/java/de/epiceric/shopchest/utils/Utils.java @@ -76,7 +76,9 @@ public class Utils { BlockStateMeta bsMeta1 = (BlockStateMeta) itemMeta1; BlockStateMeta bsMeta2 = (BlockStateMeta) itemMeta2; - similar = (bsMeta1.getBlockState() == bsMeta2.getBlockState()); + similar = (bsMeta1.hasBlockState() == bsMeta2.hasBlockState()); + + if (bsMeta1.hasBlockState()) similar &= (bsMeta1.getBlockState().equals(bsMeta2.getBlockState())); } else if (itemMeta1 instanceof BookMeta) { BookMeta bookMeta1 = (BookMeta) itemMeta1; @@ -131,11 +133,7 @@ public class Utils { if (skullMeta1.hasOwner()) similar = skullMeta1.getOwner().equals(skullMeta2.getOwner()); } - if (!similar) { - return false; - } - - return true; + return similar; } /**