@Immutable @ParametersAreNonnullByDefault public class CloudItemStack extends Object implements org.cloudburstmc.api.item.ItemStack
| Modifier and Type | Field and Description |
|---|---|
protected int |
amount |
protected Set<org.cloudburstmc.api.util.Identifier> |
canDestroy |
protected Set<org.cloudburstmc.api.util.Identifier> |
canPlaceOn |
protected Map<Class<?>,Object> |
data |
protected com.nukkitx.nbt.NbtMap |
dataTag |
protected com.google.common.collect.ImmutableMap<org.cloudburstmc.api.enchantment.EnchantmentType,org.cloudburstmc.api.enchantment.EnchantmentInstance> |
enchantments |
protected org.cloudburstmc.api.util.Identifier |
id |
protected List<String> |
itemLore |
protected String |
itemName |
protected com.nukkitx.nbt.NbtMap |
nbt |
protected com.nukkitx.protocol.bedrock.data.inventory.ItemData |
networkData |
protected static Object |
NONE_VALUE |
protected org.cloudburstmc.api.item.ItemType |
type |
| Constructor and Description |
|---|
CloudItemStack(org.cloudburstmc.api.util.Identifier id,
org.cloudburstmc.api.item.ItemType type) |
CloudItemStack(org.cloudburstmc.api.util.Identifier id,
org.cloudburstmc.api.item.ItemType type,
int amount) |
CloudItemStack(org.cloudburstmc.api.util.Identifier id,
org.cloudburstmc.api.item.ItemType type,
int amount,
String itemName,
List<String> itemLore,
Map<org.cloudburstmc.api.enchantment.EnchantmentType,org.cloudburstmc.api.enchantment.EnchantmentInstance> enchantments,
Collection<org.cloudburstmc.api.util.Identifier> canDestroy,
Collection<org.cloudburstmc.api.util.Identifier> canPlaceOn,
Map<Class<?>,Object> data,
com.nukkitx.nbt.NbtMap nbt,
com.nukkitx.nbt.NbtMap dataTag,
com.nukkitx.protocol.bedrock.data.inventory.ItemData networkData) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(org.cloudburstmc.api.item.ItemStack item) |
boolean |
equals(org.cloudburstmc.api.item.ItemStack other,
boolean checkAmount,
boolean checkData) |
boolean |
equals(Object o) |
int |
getAmount() |
org.cloudburstmc.api.item.behavior.ItemBehavior |
getBehavior() |
Collection<org.cloudburstmc.api.util.Identifier> |
getCanDestroy() |
Collection<org.cloudburstmc.api.util.Identifier> |
getCanPlaceOn() |
com.google.common.collect.ImmutableMap<Class<?>,Object> |
getData() |
com.nukkitx.nbt.NbtMap |
getDataTag() |
Map<org.cloudburstmc.api.enchantment.EnchantmentType,org.cloudburstmc.api.enchantment.EnchantmentInstance> |
getEnchantments() |
org.cloudburstmc.api.util.Identifier |
getId() |
List<String> |
getLore() |
<T> T |
getMetadata(Class<T> metadataClass,
T defaultValue) |
String |
getName() |
com.nukkitx.nbt.NbtMap |
getNbt() |
com.nukkitx.protocol.bedrock.data.inventory.ItemData |
getNetworkData() |
org.cloudburstmc.api.item.ItemType |
getType() |
int |
hashCode() |
boolean |
hasTag() |
boolean |
isMergeable(org.cloudburstmc.api.item.ItemStack other) |
org.cloudburstmc.api.item.ItemStackBuilder |
toBuilder() |
org.cloudburstmc.api.item.ItemStack |
withData(Class<?> metadataClass,
Object data) |
org.cloudburstmc.api.item.ItemStack |
withData(Object data) |
protected static final Object NONE_VALUE
protected volatile org.cloudburstmc.api.util.Identifier id
protected final org.cloudburstmc.api.item.ItemType type
protected final int amount
protected final String itemName
protected final com.google.common.collect.ImmutableMap<org.cloudburstmc.api.enchantment.EnchantmentType,org.cloudburstmc.api.enchantment.EnchantmentInstance> enchantments
protected final Set<org.cloudburstmc.api.util.Identifier> canDestroy
protected final Set<org.cloudburstmc.api.util.Identifier> canPlaceOn
protected volatile com.nukkitx.nbt.NbtMap nbt
protected volatile com.nukkitx.nbt.NbtMap dataTag
protected volatile com.nukkitx.protocol.bedrock.data.inventory.ItemData networkData
public CloudItemStack(org.cloudburstmc.api.util.Identifier id,
org.cloudburstmc.api.item.ItemType type)
public CloudItemStack(org.cloudburstmc.api.util.Identifier id,
org.cloudburstmc.api.item.ItemType type,
int amount)
@ParametersAreNullableByDefault public CloudItemStack(org.cloudburstmc.api.util.Identifier id, org.cloudburstmc.api.item.ItemType type, int amount, String itemName, List<String> itemLore, Map<org.cloudburstmc.api.enchantment.EnchantmentType,org.cloudburstmc.api.enchantment.EnchantmentInstance> enchantments, Collection<org.cloudburstmc.api.util.Identifier> canDestroy, Collection<org.cloudburstmc.api.util.Identifier> canPlaceOn, Map<Class<?>,Object> data, com.nukkitx.nbt.NbtMap nbt, com.nukkitx.nbt.NbtMap dataTag, com.nukkitx.protocol.bedrock.data.inventory.ItemData networkData)
public org.cloudburstmc.api.util.Identifier getId()
public org.cloudburstmc.api.item.ItemType getType()
getType in interface org.cloudburstmc.api.item.ItemStackpublic int getAmount()
getAmount in interface org.cloudburstmc.api.item.ItemStackpublic <T> T getMetadata(Class<T> metadataClass, T defaultValue)
getMetadata in interface org.cloudburstmc.api.item.ItemStackpublic String getName()
getName in interface org.cloudburstmc.api.item.ItemStackpublic List<String> getLore()
getLore in interface org.cloudburstmc.api.item.ItemStackpublic Map<org.cloudburstmc.api.enchantment.EnchantmentType,org.cloudburstmc.api.enchantment.EnchantmentInstance> getEnchantments()
getEnchantments in interface org.cloudburstmc.api.item.ItemStackpublic Collection<org.cloudburstmc.api.util.Identifier> getCanDestroy()
getCanDestroy in interface org.cloudburstmc.api.item.ItemStackpublic Collection<org.cloudburstmc.api.util.Identifier> getCanPlaceOn()
getCanPlaceOn in interface org.cloudburstmc.api.item.ItemStackpublic org.cloudburstmc.api.item.ItemStackBuilder toBuilder()
toBuilder in interface org.cloudburstmc.api.item.ItemStackpublic com.nukkitx.nbt.NbtMap getNbt()
public com.nukkitx.nbt.NbtMap getDataTag()
public com.nukkitx.protocol.bedrock.data.inventory.ItemData getNetworkData()
public boolean hasTag()
hasTag in interface org.cloudburstmc.api.item.ItemStackpublic org.cloudburstmc.api.item.ItemStack withData(Object data)
withData in interface org.cloudburstmc.api.item.ItemStackpublic org.cloudburstmc.api.item.ItemStack withData(Class<?> metadataClass, Object data)
withData in interface org.cloudburstmc.api.item.ItemStackpublic org.cloudburstmc.api.item.behavior.ItemBehavior getBehavior()
getBehavior in interface org.cloudburstmc.api.item.ItemStackpublic boolean isMergeable(@Nonnull org.cloudburstmc.api.item.ItemStack other)
isMergeable in interface org.cloudburstmc.api.item.ItemStackpublic boolean equals(@Nullable org.cloudburstmc.api.item.ItemStack item)
equals in interface org.cloudburstmc.api.item.ItemStackpublic boolean equals(@Nullable org.cloudburstmc.api.item.ItemStack other, boolean checkAmount, boolean checkData)
equals in interface org.cloudburstmc.api.item.ItemStackCopyright © 2021. All rights reserved.