public interface ItemData
| Modifier and Type | Interface and Description |
|---|---|
static class |
ItemData.Builder
Creates a builder for this item data.
|
| Modifier and Type | Method and Description |
|---|---|
static ItemData.Builder |
builder()
Creates a new builder for this ItemData.
|
boolean |
equals(ItemData other,
boolean checkAmount,
boolean checkMetadata,
boolean checkUserdata)
Checks if this item us equal to another
ItemData. |
@Nullable BlockDefinition |
getBlockDefinition()
Gets the block definition of this item,
if applicable.
|
long |
getBlockingTicks()
Gets the item's blocking ticks.
|
java.lang.String[] |
getCanBreak()
Gets the blocks this item can break
|
java.lang.String[] |
getCanPlace()
Gets the blocks this item can be placed on.
|
int |
getCount()
Gets the item count.
|
int |
getDamage()
Gets the item damage.
|
@NonNull ItemDefinition |
getDefinition()
Gets the
ItemDefinition. |
int |
getNetId()
Gets the item's net id.
|
@Nullable org.cloudburstmc.nbt.NbtMap |
getTag()
Gets the item NBT.
|
boolean |
isNull()
Gets if this item is null.
|
boolean |
isUsingNetId()
Gets whether this item is using a net id.
|
boolean |
isValid()
Gets if this item is valid.
|
void |
setNetId(int netId)
Sets the item's net id.
|
default ItemData.Builder |
toBuilder()
Creates a new builder for this item.
|
static final ItemData AIR
@NonNull ItemDefinition getDefinition()
ItemDefinition.int getDamage()
int getCount()
@Nullable org.cloudburstmc.nbt.NbtMap getTag()
java.lang.String[] getCanPlace()
java.lang.String[] getCanBreak()
long getBlockingTicks()
@Nullable BlockDefinition getBlockDefinition()
boolean isUsingNetId()
int getNetId()
void setNetId(int netId)
netId - the item's net idboolean isValid()
boolean isNull()
boolean equals(ItemData other, boolean checkAmount, boolean checkMetadata, boolean checkUserdata)
ItemData.other - the item data to compare againstcheckAmount - whether to check the amountcheckMetadata - whether to check the metadatacheckUserdata - whether to check the user datadefault ItemData.Builder toBuilder()
static ItemData.Builder builder()