mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-23 16:41:35 +01:00
Added checks for canPlaceOn and canDestroy sets in #isSimilar, changed emptiness check to Collection#isEmpty from != 0 in #hasNbtTag
This commit is contained in:
parent
10ece83d75
commit
bcfaf71c7c
@ -191,7 +191,9 @@ public class ItemStack implements DataContainer, PublicCloneable<ItemStack> {
|
||||
itemStack.attributes.equals(attributes) &&
|
||||
itemStack.hideFlag == hideFlag &&
|
||||
sameMeta &&
|
||||
dataCheck;
|
||||
dataCheck &&
|
||||
itemStack.canPlaceOn.equals(canPlaceOn) &&
|
||||
itemStack.canDestroy.equals(canDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@ -632,8 +634,8 @@ public class ItemStack implements DataContainer, PublicCloneable<ItemStack> {
|
||||
customModelData != 0 ||
|
||||
(itemMeta != null && itemMeta.hasNbt()) ||
|
||||
(data != null && !data.isEmpty()) ||
|
||||
canDestroy.size() != 0 ||
|
||||
canPlaceOn.size() != 0;
|
||||
!canDestroy.isEmpty() ||
|
||||
!canPlaceOn.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user