mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-05 18:32:28 +01:00
Material can be compared using identity
This commit is contained in:
parent
c45f7b2067
commit
c5141f4145
@ -189,12 +189,12 @@ public final class ItemStack implements TagReadable, HoverEventSource<HoverEvent
|
|||||||
|
|
||||||
@Contract(pure = true)
|
@Contract(pure = true)
|
||||||
public boolean isAir() {
|
public boolean isAir() {
|
||||||
return material.equals(Material.AIR);
|
return material == Material.AIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Contract(pure = true)
|
@Contract(pure = true)
|
||||||
public boolean isSimilar(@NotNull ItemStack itemStack) {
|
public boolean isSimilar(@NotNull ItemStack itemStack) {
|
||||||
return material.equals(itemStack.material) &&
|
return material == itemStack.material &&
|
||||||
meta.equals(itemStack.meta);
|
meta.equals(itemStack.meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user