mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-10 04:31:06 +00:00
Fixed issue with BlockStateMeta
This commit is contained in:
parent
ff406abf2d
commit
334219cbe1
@ -76,7 +76,9 @@ public class Utils {
|
|||||||
BlockStateMeta bsMeta1 = (BlockStateMeta) itemMeta1;
|
BlockStateMeta bsMeta1 = (BlockStateMeta) itemMeta1;
|
||||||
BlockStateMeta bsMeta2 = (BlockStateMeta) itemMeta2;
|
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) {
|
} else if (itemMeta1 instanceof BookMeta) {
|
||||||
BookMeta bookMeta1 = (BookMeta) itemMeta1;
|
BookMeta bookMeta1 = (BookMeta) itemMeta1;
|
||||||
@ -131,11 +133,7 @@ public class Utils {
|
|||||||
if (skullMeta1.hasOwner()) similar = skullMeta1.getOwner().equals(skullMeta2.getOwner());
|
if (skullMeta1.hasOwner()) similar = skullMeta1.getOwner().equals(skullMeta2.getOwner());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!similar) {
|
return similar;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user