Class BedrockItemBuilder
java.lang.Object
org.geysermc.geyser.translator.item.BedrockItemBuilder
An intermediary class made to allow easy access to work-in-progress NBT, such as lore and display.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable org.cloudburstmc.nbt.NbtMapbuild()static org.cloudburstmc.nbt.NbtMapBuildercreateItemNbt(String bedrockIdentifier, int count, int damage) Creates item NBT to nest within NBT with name, count, and damage set.static org.cloudburstmc.nbt.NbtMapBuildercreateItemNbt(org.cloudburstmc.protocol.bedrock.data.inventory.ItemData data) Creates item NBT to nest within NBT with name, count, damage, and tag set.static org.cloudburstmc.nbt.NbtMapBuildercreateItemNbt(ItemMapping mapping, int count, int damage) Creates item NBT to nest within NBT with name, count, and damage set.@Nullable String@NonNull org.cloudburstmc.nbt.NbtMapBuilderorg.cloudburstmc.nbt.NbtMapBuilderorg.cloudburstmc.nbt.NbtMapBuilderorg.cloudburstmc.nbt.NbtMapBuilderputCompound(String name, org.cloudburstmc.nbt.NbtMap value) org.cloudburstmc.nbt.NbtMapBuilder<T> org.cloudburstmc.nbt.NbtMapBuilderorg.cloudburstmc.nbt.NbtMapBuilderorg.cloudburstmc.nbt.NbtMapBuildersetCustomName(String customName) setDamage(int damage)
-
Field Details
-
EMPTY_ITEM
public static final org.cloudburstmc.nbt.NbtMap EMPTY_ITEM
-
-
Constructor Details
-
BedrockItemBuilder
public BedrockItemBuilder()
-
-
Method Details
-
getCustomName
-
setCustomName
-
getOrCreateLore
-
getDamage
-
setDamage
-
addEnchantmentGlint
-
getOrCreateNbt
public @NonNull org.cloudburstmc.nbt.NbtMapBuilder getOrCreateNbt() -
putByte
-
putByte
-
putInt
-
putList
-
putLong
-
putString
-
putCompound
public org.cloudburstmc.nbt.NbtMapBuilder putCompound(String name, org.cloudburstmc.nbt.NbtMap value) -
build
public @Nullable org.cloudburstmc.nbt.NbtMap build()- Returns:
- null if no NBT is needed on this item.
-
createItemNbt
public static org.cloudburstmc.nbt.NbtMapBuilder createItemNbt(org.cloudburstmc.protocol.bedrock.data.inventory.ItemData data) Creates item NBT to nest within NBT with name, count, damage, and tag set. -
createItemNbt
public static org.cloudburstmc.nbt.NbtMapBuilder createItemNbt(ItemMapping mapping, int count, int damage) Creates item NBT to nest within NBT with name, count, and damage set. -
createItemNbt
public static org.cloudburstmc.nbt.NbtMapBuilder createItemNbt(String bedrockIdentifier, int count, int damage) Creates item NBT to nest within NBT with name, count, and damage set.
-