Package io.papermc.paper.datacomponent
Class DataComponentTypes
java.lang.Object
io.papermc.paper.datacomponent.DataComponentTypes
All the different types of data that
ItemStacks
and ItemTypes
can have.-
Field Summary
Modifier and TypeFieldDescriptionstatic final DataComponentType.Valued
<ItemAttributeModifiers> Holds attribute modifiers applied to any item, if not set, has an implicit default value based on the item type's default attributes (e.g.static final DataComponentType.Valued
<BannerPatternLayers> Stores the additional patterns applied to a Banner or Shield.static final DataComponentType.Valued
<DyeColor> Stores the base color for a Shield.static final DataComponentType.Valued
<BlockItemDataProperties> Holds block state properties to apply when placing a block.static final DataComponentType.Valued
<BundleContents> Holds all items stored inside a Bundle.static final DataComponentType.Valued
<ItemAdventurePredicate> Controls which blocks a player in Adventure mode can break with this item.static final DataComponentType.Valued
<ItemAdventurePredicate> Controls which blocks a player in Adventure mode can place on with this item.static final DataComponentType.Valued
<ChargedProjectiles> Holds all projectiles that have been loaded into a Crossbow.static final DataComponentType.Valued
<Consumable> static final DataComponentType.Valued
<ItemContainerContents> Holds the contents of container blocks (Chests, Shulker Boxes) in item form.static final DataComponentType.Valued
<SeededContainerLoot> Holds the unresolved loot table and seed of a container-like block.static final DataComponentType.Valued
<CustomModelData> Controls the minecraft:custom_model_data property in the item model.static final DataComponentType.Valued
<Component> Custom name override for an item (as set by renaming with an Anvil).static final DataComponentType.Valued
<@NonNegative Integer> The amount of durability removed from an item, for damageable items (with theMAX_DAMAGE
component), has an implicit default value of:0
.static final DataComponentType.Valued
<DamageResistant> If present, this item will not take damage from the specified damage types.static final DataComponentType.Valued
<DeathProtection> static final DataComponentType.Valued
<DyedItemColor> Represents a color applied to a dyeable item (in theItemTypeTagKeys.DYEABLE
item tag).static final DataComponentType.Valued
<Enchantable> static final DataComponentType.Valued
<Boolean> Overrides the enchantment glint effect on an item.static final DataComponentType.Valued
<ItemEnchantments> Controls the enchantments on an item.static final DataComponentType.Valued
<Equippable> static final DataComponentType.Valued
<FireworkEffect> Stores the explosion crafted in a Firework Star.static final DataComponentType.Valued
<Fireworks> Stores all explosions crafted into a Firework Rocket, as well as flight duration.static final DataComponentType.Valued
<FoodProperties> Controls potential food benefits gained when consuming the item the component is applied on.static final DataComponentType.NonValued
static final DataComponentType.NonValued
If set, disables 'additional' tooltip part which comes from the item type (e.g.static final DataComponentType.NonValued
If set, it will completely hide whole item tooltip (that includes item name).static final DataComponentType.Valued
<MusicInstrument> Holds the instrument type used by a Goat Horn.static final DataComponentType.NonValued
Marks that a projectile item would be intangible when fired (i.e.static final DataComponentType.Valued
<Key> static final DataComponentType.Valued
<Component> When present, replaces default item name with contained chat component.static final DataComponentType.Valued
<JukeboxPlayable> static final DataComponentType.Valued
<LodestoneTracker> If present, specifies that the Compass is a Lodestone Compass.static final DataComponentType.Valued
<ItemLore> Additional lines to include in an item's tooltip.static final DataComponentType.Valued
<MapItemColor> Represents the tint of the decorations on theItemType.FILLED_MAP
item.static final DataComponentType.Valued
<MapDecorations> Holds a list of markers to be placed on aItemType.FILLED_MAP
(used for Explorer Maps).static final DataComponentType.Valued
<MapId> References the shared map state holding map contents and markers for aItemType.FILLED_MAP
.static final DataComponentType.Valued
<MapPostProcessing> Internal map item state used in the map crafting recipe.static final DataComponentType.Valued
<@Positive Integer> Controls the maximum amount of damage than an item can take, if not present, the item cannot be damaged.static final DataComponentType.Valued
<@IntRange(from=1L,to=99L) Integer> Controls the maximum stacking size of this item.static final DataComponentType.Valued
<Key> Controls the sound played by a Player Head when placed on a Note Block.static final DataComponentType.Valued
<OminousBottleAmplifier> Controls the amplifier amount for an Ominous Bottle's Bad Omen effect.static final DataComponentType.Valued
<PotDecorations> Stores the Sherds applied to each side of a Decorated Pot.static final DataComponentType.Valued
<PotionContents> Holds the contents of a potion (Potion, Splash Potion, Lingering Potion), or potion applied to a Tipped Arrow.static final DataComponentType.Valued
<ResolvableProfile> Controls the skin displayed on a Player Head.static final DataComponentType.Valued
<ItemRarity> Controls the color of the item name.static final DataComponentType.Valued
<List<Key>> List of recipes that should be unlocked when using the Knowledge Book item.static final DataComponentType.Valued
<@NonNegative Integer> The additional experience cost required to modify an item in an Anvil.static final DataComponentType.Valued
<Repairable> static final DataComponentType.Valued
<ItemEnchantments> Stores list of enchantments and their levels for an Enchanted Book.static final DataComponentType.Valued
<SuspiciousStewEffects> Holds the effects that will be applied when consuming Suspicious Stew.static final DataComponentType.Valued
<Tool> Controls the behavior of the item as a tool.static final DataComponentType.Valued
<Key> static final DataComponentType.Valued
<ItemArmorTrim> Holds the trims applied to an item in recipesstatic final DataComponentType.Valued
<Unbreakable> If set, the item will not lose any durability when used.static final DataComponentType.Valued
<UseCooldown> static final DataComponentType.Valued
<UseRemainder> static final DataComponentType.Valued
<WritableBookContent> Holds the contents in a Book and Quill.static final DataComponentType.Valued
<WrittenBookContent> Holds the contents and metadata of a Written Book. -
Method Summary
-
Field Details
-
MAX_STACK_SIZE
Controls the maximum stacking size of this item.
Values greater than 1 are mutually exclusive with theMAX_DAMAGE
component. -
MAX_DAMAGE
Controls the maximum amount of damage than an item can take, if not present, the item cannot be damaged.
Mutually exclusive with theMAX_STACK_SIZE
component greater than 1.- See Also:
-
DAMAGE
The amount of durability removed from an item, for damageable items (with theMAX_DAMAGE
component), has an implicit default value of:0
.- See Also:
-
UNBREAKABLE
If set, the item will not lose any durability when used. -
CUSTOM_NAME
Custom name override for an item (as set by renaming with an Anvil).- See Also:
-
ITEM_NAME
When present, replaces default item name with contained chat component.Differences from
CUSTOM_NAME
:- can't be changed or removed in Anvil
- is not styled with italics when displayed to player
- does not show labels where applicable (for example: banner markers, names in item frames)
- See Also:
-
ITEM_MODEL
-
LORE
Additional lines to include in an item's tooltip. -
RARITY
Controls the color of the item name. -
ENCHANTMENTS
Controls the enchantments on an item.
If not present on a non-enchantment book, this item will not work in an anvil.- See Also:
-
CAN_PLACE_ON
Controls which blocks a player in Adventure mode can place on with this item. -
CAN_BREAK
Controls which blocks a player in Adventure mode can break with this item. -
ATTRIBUTE_MODIFIERS
Holds attribute modifiers applied to any item, if not set, has an implicit default value based on the item type's default attributes (e.g. attack damage for weapons). -
CUSTOM_MODEL_DATA
Controls the minecraft:custom_model_data property in the item model. -
HIDE_ADDITIONAL_TOOLTIP
If set, disables 'additional' tooltip part which comes from the item type (e.g. content of a shulker). -
HIDE_TOOLTIP
If set, it will completely hide whole item tooltip (that includes item name). -
REPAIR_COST
The additional experience cost required to modify an item in an Anvil. If not present, has an implicit default value of:0
. -
ENCHANTMENT_GLINT_OVERRIDE
Overrides the enchantment glint effect on an item. If not present, default behaviour is used. -
INTANGIBLE_PROJECTILE
Marks that a projectile item would be intangible when fired (i.e. can only be picked up by a creative mode player). -
FOOD
Controls potential food benefits gained when consuming the item the component is applied on. Requires theCONSUMABLE
component to allow consumption in the first place. -
CONSUMABLE
-
USE_REMAINDER
-
USE_COOLDOWN
-
DAMAGE_RESISTANT
If present, this item will not take damage from the specified damage types. -
TOOL
Controls the behavior of the item as a tool. -
ENCHANTABLE
-
EQUIPPABLE
-
REPAIRABLE
-
GLIDER
-
TOOLTIP_STYLE
-
DEATH_PROTECTION
-
STORED_ENCHANTMENTS
Stores list of enchantments and their levels for an Enchanted Book. UnlikeENCHANTMENTS
, the effects provided by enchantments do not apply from this component.
If not present on an Enchanted Book, it will not work in an anvil.Has an undefined behaviour if present on an item that is not an Enchanted Book (currently the presence of this component allows enchantments from
ENCHANTMENTS
to be applied as if this item was an Enchanted Book).- See Also:
-
DYED_COLOR
Represents a color applied to a dyeable item (in theItemTypeTagKeys.DYEABLE
item tag). -
MAP_COLOR
Represents the tint of the decorations on theItemType.FILLED_MAP
item. -
MAP_ID
References the shared map state holding map contents and markers for aItemType.FILLED_MAP
. -
MAP_DECORATIONS
Holds a list of markers to be placed on aItemType.FILLED_MAP
(used for Explorer Maps). -
MAP_POST_PROCESSING
Internal map item state used in the map crafting recipe. -
CHARGED_PROJECTILES
Holds all projectiles that have been loaded into a Crossbow. If not present, the Crossbow is not charged. -
BUNDLE_CONTENTS
Holds all items stored inside a Bundle. If removed, items cannot be added to the Bundle. -
POTION_CONTENTS
Holds the contents of a potion (Potion, Splash Potion, Lingering Potion), or potion applied to a Tipped Arrow. -
SUSPICIOUS_STEW_EFFECTS
Holds the effects that will be applied when consuming Suspicious Stew. -
WRITABLE_BOOK_CONTENT
Holds the contents in a Book and Quill. -
WRITTEN_BOOK_CONTENT
Holds the contents and metadata of a Written Book. -
TRIM
Holds the trims applied to an item in recipes -
INSTRUMENT
Holds the instrument type used by a Goat Horn. -
OMINOUS_BOTTLE_AMPLIFIER
Controls the amplifier amount for an Ominous Bottle's Bad Omen effect. -
JUKEBOX_PLAYABLE
-
RECIPES
List of recipes that should be unlocked when using the Knowledge Book item. -
LODESTONE_TRACKER
If present, specifies that the Compass is a Lodestone Compass. -
FIREWORK_EXPLOSION
Stores the explosion crafted in a Firework Star. -
FIREWORKS
Stores all explosions crafted into a Firework Rocket, as well as flight duration. -
PROFILE
Controls the skin displayed on a Player Head. -
NOTE_BLOCK_SOUND
Controls the sound played by a Player Head when placed on a Note Block. -
BANNER_PATTERNS
Stores the additional patterns applied to a Banner or Shield. -
BASE_COLOR
Stores the base color for a Shield. -
POT_DECORATIONS
Stores the Sherds applied to each side of a Decorated Pot. -
CONTAINER
Holds the contents of container blocks (Chests, Shulker Boxes) in item form. -
BLOCK_DATA
Holds block state properties to apply when placing a block. -
CONTAINER_LOOT
Holds the unresolved loot table and seed of a container-like block.
-