@Immutable public class CloudItemStack extends Object implements ItemStack
| Constructor and Description |
|---|
CloudItemStack(ItemType type) |
CloudItemStack(ItemType type,
int amount) |
CloudItemStack(ItemType type,
int amount,
String itemName,
List<String> itemLore,
Collection<Enchantment> enchantments,
Collection<Identifier> canDestroy,
Collection<Identifier> canPlaceOn,
com.nukkitx.nbt.NbtMap nbt,
com.nukkitx.protocol.bedrock.data.inventory.ItemData networkData) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
ensureMetadata(Class<T> metadataClass) |
boolean |
equals(ItemStack item) |
boolean |
equals(ItemStack other,
boolean checkAmount,
boolean checkData) |
boolean |
equals(Object o) |
int |
getAmount() |
Collection<Identifier> |
getCanDestroy() |
Set<Identifier> |
getCanPlaceOn() |
Collection<Enchantment> |
getEnchantments() |
List<String> |
getLore() |
<T> Optional<T> |
getMetadata(Class<T> metadataClass) |
Optional<String> |
getName() |
com.nukkitx.protocol.bedrock.data.inventory.ItemData |
getNetworkData() |
ItemType |
getType() |
int |
hashCode() |
boolean |
isMergeable(ItemStack other) |
boolean |
isSimilar(ItemStack other) |
ItemStackBuilder |
toBuilder() |
public CloudItemStack(ItemType type)
public CloudItemStack(ItemType type, int amount)
public CloudItemStack(ItemType type, int amount, String itemName, List<String> itemLore, Collection<Enchantment> enchantments, Collection<Identifier> canDestroy, Collection<Identifier> canPlaceOn, com.nukkitx.nbt.NbtMap nbt, com.nukkitx.protocol.bedrock.data.inventory.ItemData networkData)
public <T> Optional<T> getMetadata(Class<T> metadataClass)
getMetadata in interface ItemStackpublic <T> T ensureMetadata(Class<T> metadataClass)
ensureMetadata in interface ItemStackpublic Collection<Enchantment> getEnchantments()
getEnchantments in interface ItemStackpublic Collection<Identifier> getCanDestroy()
getCanDestroy in interface ItemStackpublic Set<Identifier> getCanPlaceOn()
getCanPlaceOn in interface ItemStackpublic ItemStackBuilder toBuilder()
public com.nukkitx.protocol.bedrock.data.inventory.ItemData getNetworkData()
public boolean isMergeable(@Nonnull ItemStack other)
isMergeable in interface ItemStackCopyright © 2020. All rights reserved.