Interface ComponentAccess<T extends ComponentAccess<T>>

All Known Subinterfaces:
IFluidStack, IItemStack

@ZenRegister public interface ComponentAccess<T extends ComponentAccess<T>>
An interface exposing methods to handle setting and removing DataComponents. DataComponents are the new way of storing data in memory, instead of writing it to NBT data and to disk every time, which has a performance cost. DataComponents now occupy the space that was previously occupied or known as a NBT tag. DataComponents are immutable. Operations that set or remove a component return a new instance of the object implementing ComponentAccess DataComponents may optionally be persistent. They also may optionally be syncronised. In most cases, ComponentAccesses are going to be ItemStacks, although in NeoForge FluidStacks are too.
  • Method Summary

    Modifier and Type
    Method
    Description
    <U> U
    _get(net.minecraft.core.component.DataComponentType<? extends U> componentType)
     
    <U> boolean
    _has(net.minecraft.core.component.DataComponentType<U> componentType)
     
    <U> T
    _with(net.minecraft.core.component.DataComponentType<U> componentType, U value)
     
    <U> T
    _without(net.minecraft.core.component.DataComponentType<U> componentType)
     
    default boolean
    Gets the data in <componenttype:minecraft:creative_slot_lock>
    default net.minecraft.world.item.component.ItemAttributeModifiers
    Gets the data in <componenttype:minecraft:attribute_modifiers>
    default net.minecraft.world.level.block.entity.BannerPatternLayers
    Gets the data in <componenttype:minecraft:banner_patterns>
    default net.minecraft.world.item.DyeColor
    Gets the data in <componenttype:minecraft:base_color>
    default List<net.minecraft.world.level.block.entity.BeehiveBlockEntity.Occupant>
    Gets the data in <componenttype:minecraft:bees>
    default net.minecraft.world.item.component.CustomData
    Gets the data in <componenttype:minecraft:block_entity_data>
    default net.minecraft.world.item.component.BlockItemStateProperties
    Gets the data in <componenttype:minecraft:block_state>
    default net.minecraft.world.item.component.CustomData
    Gets the data in <componenttype:minecraft:bucket_entity_data>
    default net.minecraft.world.item.component.BundleContents
    Gets the data in <componenttype:minecraft:bundle_contents>
    default net.minecraft.world.item.AdventureModePredicate
    Gets the data in <componenttype:minecraft:can_break>
    default net.minecraft.world.item.AdventureModePredicate
    Gets the data in <componenttype:minecraft:can_place_on>
    default net.minecraft.world.item.component.ChargedProjectiles
    Gets the data in <componenttype:minecraft:charged_projectiles>
    default net.minecraft.world.item.component.ItemContainerContents
    Gets the data in <componenttype:minecraft:container>
    default net.minecraft.world.item.component.SeededContainerLoot
    Gets the data in <componenttype:minecraft:container_loot>
    default net.minecraft.world.item.component.CustomData
    Gets the data in the <componenttype:minecraft:custom_data>
    default net.minecraft.world.item.component.CustomModelData
    Gets the data in <componenttype:minecraft:custom_model_data>
    default net.minecraft.network.chat.Component
    Gets the data in the <componenttype:minecraft:custom_name> A custom name is generally displayed in italics and controlled by the user.
    default int
    Gets the data in the <componenttype:minecraft:damage>
    default net.minecraft.world.item.component.DebugStickState
    Gets the data in <componenttype:minecraft:debug_stick_state>
    default net.minecraft.world.item.component.DyedItemColor
    Gets the data in <componenttype:minecraft:dye_color>
    default boolean
    Gets the data in <componenttype:minecraft:enchantment_glint_override> If it is present, it is first checked to determine whether there is special behaviour, otherwise the code checks for enchantments.
    default net.minecraft.world.item.enchantment.ItemEnchantments
    Gets the data in <componenttype:minecraft:enchantments>
    default net.minecraft.world.item.component.CustomData
    Gets the data in <componenttype:minecraft:entity_data>
    default net.minecraft.world.item.component.FireworkExplosion
    Gets the data in <componenttype:minecraft:firework_explosion>
    default net.minecraft.world.item.component.Fireworks
    Gets the data in <componenttype:minecraft:fireworks>
    default net.minecraft.world.food.FoodProperties
    Gets the data in <componenttype:minecraft:food>
    default net.minecraft.world.item.Instrument
    Gets the data in <componenttype:minecraft:instrument>
    default net.minecraft.network.chat.Component
    Gets the data in the <componenttype:minecraft:item_name> In the case of items, an item name is set by the make to make a special instance of an item, such as with ominous banners.
    default net.minecraft.world.LockCode
    Gets the data in <componenttype:minecraft:lock>
    default net.minecraft.world.item.component.LodestoneTracker
    Gets the data in <componenttype:minecraft:lodestone_tracker>
    default net.minecraft.world.item.component.ItemLore
    Gets the data in the <componenttype:minecraft:lore>
    default net.minecraft.world.item.component.MapItemColor
    Gets the data in <componenttype:minecraft:map_color>
    default net.minecraft.world.item.component.MapDecorations
    Gets the data in <componenttype:minecraft:map_decorations>
    default net.minecraft.world.level.saveddata.maps.MapId
    Gets the data in <componenttype:minecraft:map_id>
    default net.minecraft.world.item.component.MapPostProcessing
    Gets the data in <componenttype:minecraft:map_post_processing>
    default int
    Gets the data in the <componenttype:minecraft:max_damage>
    default int
    Gets the data in the <componenttype:minecraft:max_stack_size>
    default net.minecraft.resources.ResourceLocation
    Gets the data in <componenttype:minecraft:note_block_sound>
    default int
    Gets the data in <componenttype:minecraft:ominous_bottle_amplifier>
    default net.minecraft.world.level.block.entity.PotDecorations
    Gets the data in <componenttype:minecraft:pot_decorations>
    default net.minecraft.world.item.alchemy.PotionContents
    Gets the data in <componenttype:minecraft:potion_contents>
    default net.minecraft.world.item.component.ResolvableProfile
    Gets the data in <componenttype:minecraft:profile>
    default net.minecraft.world.item.Rarity
    Gets the data in the <componenttype:minecraft:rarity>
    default List<net.minecraft.resources.ResourceLocation>
    Gets the data in <componenttype:minecraft:recipes>
    default net.minecraft.world.item.enchantment.ItemEnchantments
    Gets the data in <componenttype:minecraft:stored_enchantments>
    default net.minecraft.world.item.component.SuspiciousStewEffects
    Gets the data in <componenttype:minecraft:suspicious_stew_effects>
    default net.minecraft.world.item.component.Tool
    Gets the data in <componenttype:minecraft:tool>
    default net.minecraft.world.item.armortrim.ArmorTrim
    Gets the data in <componenttype:minecraft:trim>
    default net.minecraft.world.item.component.Unbreakable
    Gets the data in the <componenttype:minecraft:unbreakable>
    default net.minecraft.world.item.component.WritableBookContent
    Gets the data in <componenttype:minecraft:writable_book_content>
    default net.minecraft.world.item.component.WrittenBookContent
    Gets the data in <componenttype:minecraft:written_book_content>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:attribute_modifiers>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:banner_patterns>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:base_color> Used for shield colouring.
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:bees>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:block_entity_data>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:block_state>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:bucket_entity_data>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:bundle_contents>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:can_break>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:can_place_on>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:charged_projectiles> This component is used for crossbows.
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:container>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:container_loot>
    default boolean
    Checks whether the ComponentAccess has the <componenttype:minecraft:custom_data>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:custom_model_data>
    default boolean
    Checks whether the ComponentAccess has the <componenttype:minecraft:custom_name>
    default boolean
    Checks whether the ComponentAccess has the <componenttype:minecraft:damage>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:debug_stick_state>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:dyed_color>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:enchantment_glint_override>
    default boolean
    Checks whether the ComponentAccess has the <componenttype:minecraft:enchantments>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:entity_data>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:firework_explosion>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:fireworks>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:food>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:instrument>
    default boolean
    Checks whether the ComponentAccess has the <componenttype:minecraft:item_namegt;
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:lock>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:lodestone_tracker>
    default boolean
    Checks whether the ComponentAccess has the <componenttype:minecraft:lore>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:map_color>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:map_decorations> MapDecorations are additional elements that render on a map, such as waypoints.
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:map_id>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:map_post_processing> This componenet stores additional info on the map, such as the scale or whether to lock it.
    default boolean
    Checks whether the ComponentAccess has the <componenttype:minecraft:max_damage>
    default boolean
    Checks whether the ComponentAccess has the <componenttype:minecraft:max_stack_size>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:note_block_sound>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:ominous_bottle_amplifier>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:pot_decorations>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:potion_contents> Stores Potion Data on an item.
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:profile>
    default boolean
    Checks whether the ComponentAccess has the <componenttype:minecraft:rarity>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:recipes> Used for Knowledge Books.
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:repair_cost>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:stored_enchantments> The stored enchantments component is only present in enchanted books, since it just stores the enchantments under a lid for future use.
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:suspicious_stew_effects>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:tool>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:trim>
    default boolean
    Checks whether the ComponentAccess has the <componenttype:minecraft:unbreakable>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:writable_book_content>
    default boolean
    Checks whether the ComponentAccess has <componenttype:minecraft:written_book_content>
    default boolean
    Gets the data in <componenttype:minecraft:hide_additional_tooltip>
    default boolean
    Gets the data in <componenttype:minecraft:hide_tooltip>
    default boolean
    Gets the data in <componenttype:minecraft:fire_resistant>
    default boolean
    Gets the data in <componenttype:minecraft:intangible_projectile>
    default int
    Gets the data in <componenttype:minecraft:repair_cost>
    default T
    withAttributeModifiers(List<net.minecraft.world.item.component.ItemAttributeModifiers.Entry> modifiers, boolean showInTooltip)
     
    default T
    withAttributeModifiers(net.minecraft.world.item.component.ItemAttributeModifiers modifiers)
    Sets the <componenttype:minecraft:attribute_modifiers> of the ComponentAccess to have the given ItemAttributeModifiers
    default T
    withAttributeModifiers(net.minecraft.world.item.component.ItemAttributeModifiers.Entry modifier, boolean showInTooltip)
     
    default T
    withBannerPatterns(List<net.minecraft.world.level.block.entity.BannerPatternLayers.Layer> layers)
    Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given List<net.minecraft.world.level.block.entity.BannerPatternLayers.Layer>
    default T
    withBannerPatterns(net.minecraft.world.level.block.entity.BannerPatternLayers layers)
    Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given BannerPatternLayers
    default T
    withBaseColor(net.minecraft.world.item.DyeColor color)
    Sets the <componenttype:minecraft:base_color> of the ComponentAccess to have the given DyeColor
    default T
    withBees(List<net.minecraft.world.level.block.entity.BeehiveBlockEntity.Occupant> occupants)
    Sets the <componenttype:minecraft:bees> of the ComponentAccess to have the given occupants
    default T
    Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given MapData
    default T
    withBlockEntityData(net.minecraft.world.item.component.CustomData data)
    Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given CustomData
    default T
    withBlockState(net.minecraft.world.item.component.BlockItemStateProperties properties)
    Sets the <componenttype:minecraft:block_state> of the ComponentAccess to have the given BlockItemStateProperties
    default T
    Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given MapData
    default T
    withBucketEntityData(net.minecraft.world.item.component.CustomData data)
    Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given CustomData
    default T
    Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given contents
    default T
    withBundleContents(net.minecraft.world.item.component.BundleContents contents)
    Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given BundleContents
    default T
    withCanBreak(List<net.minecraft.advancements.critereon.BlockPredicate> predicates, boolean showInTooltip)
    Sets the <componenttype:minecraft:can_break> with the given BlockPredicates.
    default T
    withCanBreak(net.minecraft.world.item.AdventureModePredicate predicate)
    Sets the <componenttype:minecraft:can_break> of the ComponentAccess to have the given AdventureModePredicate
    default T
    withCanPlaceOn(List<net.minecraft.advancements.critereon.BlockPredicate> predicates, boolean showInTooltip)
    Sets the <componenttype:minecraft:can_place_on> with the given BlockPredicates.
    default T
    withCanPlaceOn(net.minecraft.world.item.AdventureModePredicate predicate)
    Sets the <componenttype:minecraft:can_place_on> of the ComponentAccess to have the given AdventureModePredicate
    default T
    Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given IItemStack
    default T
    Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given items.
    default T
    withChargedProjectiles(net.minecraft.world.item.component.ChargedProjectiles chargedProjectiles)
    Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given ChargedProjectiles
    default T
    Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given values.
    default T
    withContainer(net.minecraft.world.item.component.ItemContainerContents contents)
    Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given ItemContainerContents
    default T
    withContainerLoot(net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> lootTable, long seed)
    Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given loot table and seed.
    default T
    withContainerLoot(net.minecraft.world.item.component.SeededContainerLoot loot)
    Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given SeededContainerLoot
    default T
    Sets the <componenttype:minecraft:creative_slot_lock> of the ComponentAccess to exist.
    default T
    withCustomData(MapData customData)
    Sets the invalid input: '<'componenttype:minecraft:custom_data> of the ComponentAccess to have the given MapData
    default T
    withCustomData(net.minecraft.world.item.component.CustomData customData)
    Sets the <componenttype:minecraft:custom_data> of the ComponentAccess to have the given CustomData
    default T
    Sets the <componenttype:minecraft:custom_model_data> of the ComponentAccess to have the given value.
    default T
    withCustomModelData(net.minecraft.world.item.component.CustomModelData data)
     
    default T
    withCustomName(net.minecraft.network.chat.Component name)
    Sets the <componenttype:minecraft:custom_name> of the ComponentAccess.
    default T
    withDamage(int damage)
    Sets the <componenttype:minecraft:damage> of the ComponentAccess to have the given value.
    default T
    withDebugStickState(net.minecraft.world.item.component.DebugStickState state)
    Sets the <componenttype:minecraft:debug_stick_state> of the ComponentAccess to have the given DebugStickState
    default T
    withDyedColor(int rgb, boolean showInTooltip)
    Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess.
    default T
    withDyedColor(net.minecraft.world.item.component.DyedItemColor color)
    Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess to have the given DyedItemColor
    default T
    withEnchantment(net.minecraft.world.item.enchantment.Enchantment enchantment, int level)
    Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given Enchantment and level.
    default T
    Sets the <componenttype:minecraft:enchantment_glint_override> of the ComponentAccess to have the given value.
    default T
    withEnchantments(net.minecraft.world.item.enchantment.ItemEnchantments enchantments)
    Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given ItemEnchantments
    default T
    Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given MapData
    default T
    withEntityData(net.minecraft.world.item.component.CustomData data)
    Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given CustomData
    default T
    Sets the <componenttype:minecraft:fire_resistant> of the ComponentAccess to exist.
    default T
    withFireworkExplosion(net.minecraft.world.item.component.FireworkExplosion explosion)
    Sets the <componenttype:minecraft:firework_explosion> of the ComponentAccess to have the given FireworkExplosion
    default T
    withFireworks(int flightDuration, List<net.minecraft.world.item.component.FireworkExplosion> explosions)
    Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given duration and explosions.
    default T
    withFireworks(net.minecraft.world.item.component.Fireworks fireworks)
    Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given Fireworks
    default T
    withFood(net.minecraft.world.food.FoodProperties food)
    Sets the <componenttype:minecraft:food> of the ComponentAccess to have the given FoodProperties
    default T
    Sets the <componenttype:minecraft:hide_additional_tooltip> of the ComponentAccess to exist.
    default T
    Sets the <componenttype:minecraft:hide_tooltip> of the ComponentAccess to exist.
    default T
    withInstrument(net.minecraft.world.item.Instrument instrument)
    Sets the <componenttype:minecraft:instrument> of the ComponentAccess to have the given Instrument
    default T
    Sets the <componenttype:minecraft:intangible_projectile> of the ComponentAccess to exist.
    default T
    withItemName(net.minecraft.network.chat.Component name)
    Sets the <componenttype:minecraft:item_name> of the ComponentAccess to have the given Component
    default T
    Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given string.
    default T
    withLock(net.minecraft.world.LockCode lock)
    Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given LockCode
    default T
    withLodestoneTracker(net.minecraft.world.item.component.LodestoneTracker tracker)
    Sets the <componenttype:minecraft:lodestone_tracker> of the ComponentAccess to have the given LodestoneTracker
    default T
    withLore(List<net.minecraft.network.chat.Component> components)
    Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given stdlib.List<Component>
    default T
    withLore(net.minecraft.network.chat.Component components)
     
    default T
    withLore(net.minecraft.world.item.component.ItemLore lore)
    Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given ItemLore
    default T
    withMapColor(int rgb)
    Sets the <componenttype:minecraft:map_color> of the ComponentAccess.
    default T
    withMapColor(net.minecraft.world.item.component.MapItemColor color)
    Sets the <componenttype:minecraft:map_color> of the ComponentAccess to have the given MapItemColor
    default T
    withMapDecorations(Map<String,net.minecraft.world.item.component.MapDecorations.Entry> decorations)
    Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given values.
    default T
    withMapDecorations(net.minecraft.world.item.component.MapDecorations decorations)
    Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given MapDecorations
    default T
    withMapId(int id)
    Sets the <componenttype:minecraft:map_id> of the ComponentAccess to have the given value.
    default T
    withMapId(net.minecraft.world.level.saveddata.maps.MapId mapId)
    Sets the <componenttype:minecraft:map_id> of the ComponentAccess to have the given MapId
    default T
    withMapPostProcessing(net.minecraft.world.item.component.MapPostProcessing value)
    Sets the <componenttype:minecraft:map_post_processing> of the ComponentAccess to have the given MapPostProcessing
    default T
    withMaxDamage(int maxDamage)
    Sets the <componenttype:minecraft:max_damage> of the ComponentAccess to have the given value.
    default T
    withMaxStackSize(int maxStackSize)
    Sets the <componenttype:minecraft:stack_size> of the ComponentAccess to have the given value.
    default T
    withNoteBlockSound(net.minecraft.resources.ResourceLocation sound)
    Sets the <componenttype:minecraft:note_block_sound> of the ComponentAccess to have the given ResourceLocation
    default T
    Sets the <componenttype:minecraft:ominous_bottle_amplifier> of the ComponentAccess to have the given amplifier.
    default T
    Removes the <componenttype:minecraft:attribute_modifiers> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:banner_patterns> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:base_color> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:bees> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:block_entity_data> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:block_state> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:bucket_entity_data> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:bundle_contents> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:can_break> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:can_place_on> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:charged_projectiles> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:container> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:container_loot> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:creative_slot_lock> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:custom_data> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:custom_model_data> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:custom_name> from the ComponentAccess
    default T
    Removes the <componenttype:minecraft:damage> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:debug_stick_state> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:dyed_color> from the ComponentAccess.
    default T
    withoutEnchantment(net.minecraft.world.item.enchantment.Enchantment enchantment)
    Removes the Enchantment from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:enchantment_glint_override> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:enchantments> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:entity_data> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:fire_resistant> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:firework_explosion> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:fireworks> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:food> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:hide_additional_tooltip> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:hide_tooltip> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:instrument> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:intangible_projectile> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:item_name> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:lock> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:lodestone_tracker> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:lore> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:map_color> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:map_decorations> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:map_id> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:map_post_processing> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:max_damage> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:stack_size> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:note_block_sound> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:ominous_bottle_amplifier> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:pot_decorations> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:potion_contents> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:profile> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:rarity> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:recipes> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:repair_cost> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:stored_enchantments> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:suspicious_stew_effects> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:tool> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:trim> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:unbreakable> from the ComponentAccess
    default T
    Removes the <componenttype:minecraft:writable_book_content> from the ComponentAccess.
    default T
    Removes the <componenttype:minecraft:written_book_content> from the ComponentAccess.
    default T
    withPotDecorations(net.minecraft.world.item.Item back, net.minecraft.world.item.Item left, net.minecraft.world.item.Item right, net.minecraft.world.item.Item front)
    Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given items.
    default T
    withPotDecorations(net.minecraft.world.level.block.entity.PotDecorations decorations)
    Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given PotDecorations
    default T
    withPotionContents(net.minecraft.world.item.alchemy.Potion potion)
    Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion and no custom effects
    default T
    withPotionContents(net.minecraft.world.item.alchemy.PotionContents contents)
    Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given PotionContents
    default T
    withPotionContents(net.minecraft.world.item.alchemy.Potion potion, int customColor, List<net.minecraft.world.effect.MobEffectInstance> customEffects)
    Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion and the given MobEffectInstance effects.
    default T
    withPotionContents(net.minecraft.world.item.alchemy.Potion potion, List<net.minecraft.world.effect.MobEffectInstance> customEffects)
    Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion and the given MobEffectInstance effects.
    default T
    withProfile(net.minecraft.world.item.component.ResolvableProfile profile)
    Sets the <componenttype:minecraft:profile> of the ComponentAccess to have the given ResolvableProfile
    default T
    withRarity(net.minecraft.world.item.Rarity rarity)
    Sets the <componenttype:minecraft:rarity> of the ComponentAccess to have the given Rarity
    default T
    withRecipes(List<net.minecraft.resources.ResourceLocation> recipes)
    Sets the <componenttype:minecraft:recipes> of the ComponentAccess to have the given List<net.minecraft.resources.ResourceLocation>
    default T
    withRepairCost(int cost)
    Sets the <componenttype:minecraft:repair_cost> of the ComponentAccess to have the given value.
    default T
    withStoredEnchantments(net.minecraft.world.item.enchantment.ItemEnchantments enchantments)
    Sets the <componenttype:minecraft:stored_enchantments> of the ComponentAccess to have the given ItemEnchantments
    default T
    withSuspiciousStewEffects(List<net.minecraft.world.item.component.SuspiciousStewEffects.Entry> effects)
    Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects SuspiciousStewEffects.Entry is effectively a pair of Effect and duration.
    default T
    withSuspiciousStewEffects(net.minecraft.world.item.component.SuspiciousStewEffects suspiciousStewEffects)
    Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects
    default T
    withTool(List<net.minecraft.world.item.component.Tool.Rule> rules, float defaultMiningSpeed, int damagePerBlock)
    Sets the <componenttype:minecraft:tool> of the ComponentAccess to have the given data.
    default T
    withTool(net.minecraft.world.item.component.Tool tool)
    Sets the <componenttype:minecraft:tool> of the ComponentAccess to have the given Tool
    default T
    withTrim(net.minecraft.world.item.armortrim.ArmorTrim trim)
    Sets the <componenttype:minecraft:trim> of the ComponentAccess to have the given ArmorTrim
    default T
    withUnbreakable(boolean showInTooltip)
    Sets the <componenttype:minecraft:unbreakable> of the ComponentAccess.
    default T
    withUnbreakable(net.minecraft.world.item.component.Unbreakable unbreakable)
    Sets the <componenttype:minecraft:unbreakable> of the ComponentAccess.
    default T
    withWritableBookContent(List<net.minecraft.server.network.Filterable<String>> pages)
     
    default T
    withWritableBookContent(net.minecraft.world.item.component.WritableBookContent content)
    Sets the <componenttype:minecraft:writable_book_content> of the ComponentAccess to have the given WritableBookContent
    default T
    withWrittenBookContent(net.minecraft.world.item.component.WrittenBookContent content)
    Sets the <componenttype:minecraft:written_book_content> of the ComponentAccess to have the given WrittenBookContent
  • Method Details

    • hasCustomData

      default boolean hasCustomData()
      Checks whether the ComponentAccess has the <componenttype:minecraft:custom_data>
      Returns:
      Whether the componenttype is stored.
    • getCustomData

      default net.minecraft.world.item.component.CustomData getCustomData()
      Gets the data in the <componenttype:minecraft:custom_data>
      Returns:
      A CustomData that wraps around a MapData object containing the data.
    • withCustomData

      default T withCustomData(MapData customData)
      Sets the invalid input: '<'componenttype:minecraft:custom_data> of the ComponentAccess to have the given MapData
      Parameters:
      customData - The MapData to set the component to.
      Returns:
      The new instance with the modified data.
      DocParam:
      customData {custom_ammo_thing: 1, owner: "Benji"}
    • withCustomData

      default T withCustomData(net.minecraft.world.item.component.CustomData customData)
      Sets the <componenttype:minecraft:custom_data> of the ComponentAccess to have the given CustomData
      Returns:
      The new instance with the modified data.
    • withoutCustomData

      default T withoutCustomData()
      Removes the <componenttype:minecraft:custom_data> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasMaxStackSize

      default boolean hasMaxStackSize()
      Checks whether the ComponentAccess has the <componenttype:minecraft:max_stack_size>
      Returns:
      Whether the componenttype is stored.
    • getMaxStackSize

      default int getMaxStackSize()
      Gets the data in the <componenttype:minecraft:max_stack_size>
      Returns:
      An int with the max stack size of the ComponentAccess.
    • withMaxStackSize

      default T withMaxStackSize(int maxStackSize)
      Sets the <componenttype:minecraft:stack_size> of the ComponentAccess to have the given value. Non standard stack sizes may render differently and may not be handled correctly by all mods. Test your changes!
      Parameters:
      maxStackSize - The new maxStackSize of the ComponentAccess.
      Returns:
      The new instance with the modified data.
      DocParam:
      maxStackSize 16
    • withoutMaxStackSize

      default T withoutMaxStackSize()
      Removes the <componenttype:minecraft:stack_size> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasMaxDamage

      default boolean hasMaxDamage()
      Checks whether the ComponentAccess has the <componenttype:minecraft:max_damage>
      Returns:
      Whether the componenttype is stored.
    • getMaxDamage

      default int getMaxDamage()
      Gets the data in the <componenttype:minecraft:max_damage>
      Returns:
      An int returning the maximum durability, damage or uses.
    • withMaxDamage

      default T withMaxDamage(int maxDamage)
      Sets the <componenttype:minecraft:max_damage> of the ComponentAccess to have the given value. It is likely that you need to call withDamage(0) in order for some things to function properly.
      Returns:
      The new instance with the modified data.
      DocParam:
      maxDamage 1024, maxDamage 1024
    • withoutMaxDamage

      default T withoutMaxDamage()
      Removes the <componenttype:minecraft:max_damage> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasDamage

      default boolean hasDamage()
      Checks whether the ComponentAccess has the <componenttype:minecraft:damage>
      Returns:
      Whether the componenttype is stored.
    • getDamage

      default int getDamage()
      Gets the data in the <componenttype:minecraft:damage>
      Returns:
      An int returning the current durability, damage or uses.
    • withDamage

      default T withDamage(int damage)
      Sets the <componenttype:minecraft:damage> of the ComponentAccess to have the given value. Damage is related to durability. Using this on an item that has no maxDamage may have unforeseen issues.
      Parameters:
      damage - The new damage of the ComponentAccess.
      Returns:
      The new instance with the modified data.
      DocParam:
      damage 16
    • withoutDamage

      default T withoutDamage()
      Removes the <componenttype:minecraft:damage> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasUnbreakable

      default boolean hasUnbreakable()
      Checks whether the ComponentAccess has the <componenttype:minecraft:unbreakable>
      Returns:
      Whether the componenttype is stored.
    • getUnbreakable

      default net.minecraft.world.item.component.Unbreakable getUnbreakable()
      Gets the data in the <componenttype:minecraft:unbreakable>
      Returns:
      An Unbreakable containing the configuration of the Component.
    • withUnbreakable

      default T withUnbreakable(boolean showInTooltip)
      Sets the <componenttype:minecraft:unbreakable> of the ComponentAccess. The existance of the component makes the ComponentAccess unbreakable.
      Parameters:
      showInTooltip - Whether to show that the ComponentAccess is unbreakable in a tooltip.
      Returns:
      The new instance with the modified data.
    • withUnbreakable

      default T withUnbreakable(net.minecraft.world.item.component.Unbreakable unbreakable)
      Sets the <componenttype:minecraft:unbreakable> of the ComponentAccess. The existance of the component makes the ComponentAccess unbreakable.
      Parameters:
      unbreakable - The Unbreakable instance with the configured values.
      Returns:
      The new instance with the modified data.
    • withoutUnbreakable

      default T withoutUnbreakable()
      Removes the <componenttype:minecraft:unbreakable> from the ComponentAccess
      Returns:
      The new instance with the modified data.
    • hasCustomName

      default boolean hasCustomName()
      Checks whether the ComponentAccess has the <componenttype:minecraft:custom_name>
      Returns:
      Whether the componenttype is stored.
    • getCustomName

      default net.minecraft.network.chat.Component getCustomName()
      Gets the data in the <componenttype:minecraft:custom_name> A custom name is generally displayed in italics and controlled by the user.
      Returns:
      A Component representing the ComponentAccess's custom name.
    • withCustomName

      default T withCustomName(net.minecraft.network.chat.Component name)
      Sets the <componenttype:minecraft:custom_name> of the ComponentAccess.
      Parameters:
      name - The component to use.
      Returns:
      The new instance with the modified data.
      DocParam:
      name Component.literal("Fancy Water"), name Component.translatable("mypack.lore.fancy_water")
    • withoutCustomName

      default T withoutCustomName()
      Removes the <componenttype:minecraft:custom_name> from the ComponentAccess
      Returns:
      The new instance with the modified data.
    • hasItemName

      default boolean hasItemName()
      Checks whether the ComponentAccess has the <componenttype:minecraft:item_namegt;
      Returns:
      Whether the componenttype is stored.
    • getItemName

      default net.minecraft.network.chat.Component getItemName()
      Gets the data in the <componenttype:minecraft:item_name> In the case of items, an item name is set by the make to make a special instance of an item, such as with ominous banners.
      Returns:
      A Component representing the ComponentAccess's custom name.
    • withItemName

      default T withItemName(net.minecraft.network.chat.Component name)
      Sets the <componenttype:minecraft:item_name> of the ComponentAccess to have the given Component
      Returns:
      The new instance with the modified data.
      DocParam:
      name Component.literal("Fancy Water"), name Component.translatable("mypack.lore.fancy_water")
    • withoutItemName

      default T withoutItemName()
      Removes the <componenttype:minecraft:item_name> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasLore

      default boolean hasLore()
      Checks whether the ComponentAccess has the <componenttype:minecraft:lore>
      Returns:
      Whether the componenttype is stored.
    • getLore

      default net.minecraft.world.item.component.ItemLore getLore()
      Gets the data in the <componenttype:minecraft:lore>
      Returns:
      A ItemLore instance, which effectively behaves as a stdlib.List<Component>.
    • withLore

      default T withLore(List<net.minecraft.network.chat.Component> components)
      Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given stdlib.List<Component>
      Parameters:
      components - The list of Components to add as lore.
      Returns:
      The new instance with the modified data.
      DocParam:
      components [Component.literal("Found in a dark cave"), Component.translatable("Belonged to a Dragon")]
    • withLore

      default T withLore(net.minecraft.network.chat.Component components)
    • withLore

      default T withLore(net.minecraft.world.item.component.ItemLore lore)
      Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given ItemLore
      Returns:
      The new instance with the modified data.
    • withoutLore

      default T withoutLore()
      Removes the <componenttype:minecraft:lore> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasRarity

      default boolean hasRarity()
      Checks whether the ComponentAccess has the <componenttype:minecraft:rarity>
      Returns:
      Whether the componenttype is stored.
    • getRarity

      default net.minecraft.world.item.Rarity getRarity()
      Gets the data in the <componenttype:minecraft:rarity>
      Returns:
      A Rarity
    • withRarity

      default T withRarity(net.minecraft.world.item.Rarity rarity)
      Sets the <componenttype:minecraft:rarity> of the ComponentAccess to have the given Rarity
      Parameters:
      rarity - The rarity to set
      Returns:
      The new instance with the modified data.
      DocParam:
      rarity invalid input: '<'constant:minecraft:item/rarity:epic>
    • withoutRarity

      default T withoutRarity()
      Removes the <componenttype:minecraft:rarity> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasEnchantments

      default boolean hasEnchantments()
      Checks whether the ComponentAccess has the <componenttype:minecraft:enchantments>
      Returns:
      Whether the componenttype is stored.
    • getEnchantments

      default net.minecraft.world.item.enchantment.ItemEnchantments getEnchantments()
      Gets the data in <componenttype:minecraft:enchantments>
      Returns:
      A ItemEnchantments instance
    • withEnchantments

      default T withEnchantments(net.minecraft.world.item.enchantment.ItemEnchantments enchantments)
      Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given ItemEnchantments
      Returns:
      The new instance with the modified data.
    • withEnchantment

      default T withEnchantment(net.minecraft.world.item.enchantment.Enchantment enchantment, int level)
      Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given Enchantment and level.
      Parameters:
      enchantment - The enchantment to add
      level - The level of the enchantment to set
      Returns:
      The new instance with the modified data.
      DocParam:
      enchantment invalid input: '<'enchantment:minecraft:efficiency>, level 4
    • withoutEnchantment

      default T withoutEnchantment(net.minecraft.world.item.enchantment.Enchantment enchantment)
      Removes the Enchantment from the ComponentAccess.
      Parameters:
      enchantment - The Enchantment to remove
      Returns:
      The new instance with the modified data.
      DocParam:
      enchantment invalid input: '<'enchantment:minecraft:mending>
    • withoutEnchantments

      default T withoutEnchantments()
      Removes the <componenttype:minecraft:enchantments> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasCanPlaceOn

      default boolean hasCanPlaceOn()
      Checks whether the ComponentAccess has <componenttype:minecraft:can_place_on>
      Returns:
      Whether the componenttype is stored.
    • getCanPlaceOn

      default net.minecraft.world.item.AdventureModePredicate getCanPlaceOn()
      Gets the data in <componenttype:minecraft:can_place_on>
      Returns:
      An AdventureModePredicate instance that holds data on whether a Block is placeable in adventure mode.
    • withCanPlaceOn

      default T withCanPlaceOn(List<net.minecraft.advancements.critereon.BlockPredicate> predicates, boolean showInTooltip)
      Sets the <componenttype:minecraft:can_place_on> with the given BlockPredicates. Any predicate that matches will allow the BlockItem within the ItemStack to be placed.
      Parameters:
      predicates - The collection of predicates to test for
      showInTooltip - Whether to show the restriction in the tooltip or not.
      Returns:
      The new instance with the modified data.
      DocParam:
      predicates BlockPredicate.create().of(invalid input: '<'block:minecraft:dirt>).build()
    • withCanPlaceOn

      default T withCanPlaceOn(net.minecraft.world.item.AdventureModePredicate predicate)
      Sets the <componenttype:minecraft:can_place_on> of the ComponentAccess to have the given AdventureModePredicate
      Parameters:
      predicate - The adventure mode predicate to use to determine whether the current block can be placed on another block.
      Returns:
      The new instance with the modified data.
    • withoutCanPlaceOn

      default T withoutCanPlaceOn()
      Removes the <componenttype:minecraft:can_place_on> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasCanBreak

      default boolean hasCanBreak()
      Checks whether the ComponentAccess has <componenttype:minecraft:can_break>
      Returns:
      Whether the componenttype is stored.
    • getCanBreak

      default net.minecraft.world.item.AdventureModePredicate getCanBreak()
      Gets the data in <componenttype:minecraft:can_break>
      Returns:
      An AdventureModePredicate instance that holds data on whether a Block is breakable using this Item.
    • withCanBreak

      default T withCanBreak(List<net.minecraft.advancements.critereon.BlockPredicate> predicates, boolean showInTooltip)
      Sets the <componenttype:minecraft:can_break> with the given BlockPredicates. Any predicate that matches will allow the Block to be broken by this ItemStack.
      Parameters:
      predicates - The collection of predicates to test for
      showInTooltip - Whether to show the ability in the tooltip or not.
      Returns:
      The new instance with the modified data.
      DocParam:
      predicates BlockPredicate.create().of(invalid input: '<'block:minecraft:diamond_ore>).build(), showInTooltip true
    • withCanBreak

      default T withCanBreak(net.minecraft.world.item.AdventureModePredicate predicate)
      Sets the <componenttype:minecraft:can_break> of the ComponentAccess to have the given AdventureModePredicate
      Parameters:
      predicate - The adventure mode predicate to use to determine whether the item can be used to break a block.
      Returns:
      The new instance with the modified data.
    • withoutCanBreak

      default T withoutCanBreak()
      Removes the <componenttype:minecraft:can_break> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasAttributeModifiers

      default boolean hasAttributeModifiers()
      Checks whether the ComponentAccess has <componenttype:minecraft:attribute_modifiers>
      Returns:
      Whether the componenttype is stored.
    • getAttributeModifiers

      default net.minecraft.world.item.component.ItemAttributeModifiers getAttributeModifiers()
      Gets the data in <componenttype:minecraft:attribute_modifiers>
      Returns:
      An ItemAttributeModifiers.
    • withAttributeModifiers

      default T withAttributeModifiers(net.minecraft.world.item.component.ItemAttributeModifiers modifiers)
      Sets the <componenttype:minecraft:attribute_modifiers> of the ComponentAccess to have the given ItemAttributeModifiers
      Parameters:
      modifiers - The attributes to give to the item.
      Returns:
      The new instance with the modified data.
      DocParam:
      modifiers ItemAttributeModifiers.builder().add(invalid input: '<'attribute:minecraft:player.block_break_speed>, AttributeModifier.create("test", 2.0, invalid input: '<'constant:minecraft:attribute/operation:add_value>, "596e0826-7c66-42c6-b3da-45a6d667ccf7"), invalid input: '<'constant:minecraft:equipmentslot/group:mainhand>).build();
    • withAttributeModifiers

      default T withAttributeModifiers(net.minecraft.world.item.component.ItemAttributeModifiers.Entry modifier, boolean showInTooltip)
      Returns:
      The new instance with the modified data.
    • withAttributeModifiers

      default T withAttributeModifiers(List<net.minecraft.world.item.component.ItemAttributeModifiers.Entry> modifiers, boolean showInTooltip)
    • withoutAttributeModifiers

      default T withoutAttributeModifiers()
      Removes the <componenttype:minecraft:attribute_modifiers> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasCustomModelData

      default boolean hasCustomModelData()
      Checks whether the ComponentAccess has <componenttype:minecraft:custom_model_data>
      Returns:
      Whether the componenttype is stored.
    • getCustomModelData

      default net.minecraft.world.item.component.CustomModelData getCustomModelData()
      Gets the data in <componenttype:minecraft:custom_model_data>
      Returns:
      A CustomModelData
    • withCustomModelData

      default T withCustomModelData(int value)
      Sets the <componenttype:minecraft:custom_model_data> of the ComponentAccess to have the given value.
      Parameters:
      value - The value to set the CustomModelData to
      Returns:
      The new instance with the modified data.
      DocParam:
      value 2
    • withCustomModelData

      default T withCustomModelData(net.minecraft.world.item.component.CustomModelData data)
      Returns:
      The new instance with the modified data.
    • withoutCustomModelData

      default T withoutCustomModelData()
      Removes the <componenttype:minecraft:custom_model_data> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hideAdditionalTooltip

      default boolean hideAdditionalTooltip()
      Gets the data in <componenttype:minecraft:hide_additional_tooltip>
      Returns:
      A boolean representing whether to hide the additional tooltip.
    • withHideAdditionalTooltip

      default T withHideAdditionalTooltip()
      Sets the <componenttype:minecraft:hide_additional_tooltip> of the ComponentAccess to exist.
      Returns:
      The new instance with the modified data.
    • withoutHideAdditionalTooltip

      default T withoutHideAdditionalTooltip()
      Removes the <componenttype:minecraft:hide_additional_tooltip> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hideTooltip

      default boolean hideTooltip()
      Gets the data in <componenttype:minecraft:hide_tooltip>
      Returns:
      A boolean representing whether to hide the tooltip.
    • withHideTooltip

      default T withHideTooltip()
      Sets the <componenttype:minecraft:hide_tooltip> of the ComponentAccess to exist.
      Returns:
      The new instance with the modified data.
    • withoutHideTooltip

      default T withoutHideTooltip()
      Removes the <componenttype:minecraft:hide_tooltip> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasRepairCost

      default boolean hasRepairCost()
      Checks whether the ComponentAccess has <componenttype:minecraft:repair_cost>
      Returns:
      Whether the componenttype is stored.
    • repairCost

      default int repairCost()
      Gets the data in <componenttype:minecraft:repair_cost>
      Returns:
      An int representing the repair cost of the item. Used for anvil and grindstone xp.
    • withRepairCost

      default T withRepairCost(int cost)
      Sets the <componenttype:minecraft:repair_cost> of the ComponentAccess to have the given value.
      Parameters:
      cost - The repair cost
      Returns:
      The new instance with the modified data.
      DocParam:
      cost 20
    • withoutRepairCost

      default T withoutRepairCost()
      Removes the <componenttype:minecraft:repair_cost> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • creativeSlotLock

      default boolean creativeSlotLock()
      Gets the data in <componenttype:minecraft:creative_slot_lock>
      Returns:
      A boolean representing whether to disallow picking up the item from the creative menu.
    • withCreativeSlotLock

      default T withCreativeSlotLock()
      Sets the <componenttype:minecraft:creative_slot_lock> of the ComponentAccess to exist.
      Returns:
      The new instance with the modified data.
    • withoutCreativeSlotLock

      default T withoutCreativeSlotLock()
      Removes the <componenttype:minecraft:creative_slot_lock> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasEnchantmentGlintOverride

      default boolean hasEnchantmentGlintOverride()
      Checks whether the ComponentAccess has <componenttype:minecraft:enchantment_glint_override>
      Returns:
      Whether the componenttype is stored.
    • getEnchantmentGlintOverride

      default boolean getEnchantmentGlintOverride()
      Gets the data in <componenttype:minecraft:enchantment_glint_override> If it is present, it is first checked to determine whether there is special behaviour, otherwise the code checks for enchantments.
      Returns:
      A boolean representing whether to override enchantment glint rendering.
    • withEnchantmentGlintOverride

      default T withEnchantmentGlintOverride(boolean value)
      Sets the <componenttype:minecraft:enchantment_glint_override> of the ComponentAccess to have the given value. If it is false, the item will never render the enchantment glint If it is true, the item will render the enchantment glint always, indenpendently of whether it is enchanted or not.
      Parameters:
      value - The value of the override, as described above
      Returns:
      The new instance with the modified data.
      DocParam:
      value true
    • withoutEnchantmentGlintOverride

      default T withoutEnchantmentGlintOverride()
      Removes the <componenttype:minecraft:enchantment_glint_override> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • isIntangibleProjectile

      default boolean isIntangibleProjectile()
      Gets the data in <componenttype:minecraft:intangible_projectile>
      Returns:
      A boolean representing whether the projectile is intangible.
    • withIntangibleProjectile

      default T withIntangibleProjectile()
      Sets the <componenttype:minecraft:intangible_projectile> of the ComponentAccess to exist.
      Returns:
      The new instance with the modified data.
    • withoutIntangibleProjectile

      default T withoutIntangibleProjectile()
      Removes the <componenttype:minecraft:intangible_projectile> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasFood

      default boolean hasFood()
      Checks whether the ComponentAccess has <componenttype:minecraft:food>
      Returns:
      Whether the componenttype is stored.
    • getFood

      default net.minecraft.world.food.FoodProperties getFood()
      Gets the data in <componenttype:minecraft:food>
      Returns:
      A FoodProperties instance.
    • withFood

      default T withFood(net.minecraft.world.food.FoodProperties food)
      Sets the <componenttype:minecraft:food> of the ComponentAccess to have the given FoodProperties
      Returns:
      The new instance with the modified data.
    • withoutFood

      default T withoutFood()
      Removes the <componenttype:minecraft:food> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • isFireResistant

      default boolean isFireResistant()
      Gets the data in <componenttype:minecraft:fire_resistant>
      Returns:
      A boolean representing whether to resist fire.
    • withFireResistant

      default T withFireResistant()
      Sets the <componenttype:minecraft:fire_resistant> of the ComponentAccess to exist.
      Returns:
      The new instance with the modified data.
    • withoutFireResistant

      default T withoutFireResistant()
      Removes the <componenttype:minecraft:fire_resistant> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasTool

      default boolean hasTool()
      Checks whether the ComponentAccess has <componenttype:minecraft:tool>
      Returns:
      Whether the componenttype is stored.
    • getTool

      default net.minecraft.world.item.component.Tool getTool()
      Gets the data in <componenttype:minecraft:tool>
      Returns:
      A Tool instance.
    • withTool

      default T withTool(List<net.minecraft.world.item.component.Tool.Rule> rules, float defaultMiningSpeed, int damagePerBlock)
      Sets the <componenttype:minecraft:tool> of the ComponentAccess to have the given data. A Tool instance is constructed from the parameters.
      Parameters:
      rules - The list of rules the new Tool instance will have
      defaultMiningSpeed - The default mining speed of the new tool
      damagePerBlock - The damage or durability that is dealt to the Tool after use.
      Returns:
      The new instance with the modified data.
      DocParam:
      rules [ToolRule.minesAndDrops(invalid input: '<'tag:blocks:minecraft:planks>, 6.0f)], defaultMiningSpeed 0.25f, damagePerBlock 1
    • withTool

      default T withTool(net.minecraft.world.item.component.Tool tool)
      Sets the <componenttype:minecraft:tool> of the ComponentAccess to have the given Tool
      Returns:
      The new instance with the modified data.
    • withoutTool

      default T withoutTool()
      Removes the <componenttype:minecraft:tool> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasStoredEnchantments

      default boolean hasStoredEnchantments()
      Checks whether the ComponentAccess has <componenttype:minecraft:stored_enchantments> The stored enchantments component is only present in enchanted books, since it just stores the enchantments under a lid for future use. The item is not enchanted.
      Returns:
      Whether the componenttype is stored.
    • getStoredEnchantments

      default net.minecraft.world.item.enchantment.ItemEnchantments getStoredEnchantments()
      Gets the data in <componenttype:minecraft:stored_enchantments>
      Returns:
      An ItemEnchantments instance.
    • withStoredEnchantments

      default T withStoredEnchantments(net.minecraft.world.item.enchantment.ItemEnchantments enchantments)
      Sets the <componenttype:minecraft:stored_enchantments> of the ComponentAccess to have the given ItemEnchantments
      Returns:
      The new instance with the modified data.
    • withoutStoredEnchantments

      default T withoutStoredEnchantments()
      Removes the <componenttype:minecraft:stored_enchantments> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasDyedColor

      default boolean hasDyedColor()
      Checks whether the ComponentAccess has <componenttype:minecraft:dyed_color>
      Returns:
      Whether the componenttype is stored.
    • getDyedColor

      default net.minecraft.world.item.component.DyedItemColor getDyedColor()
      Gets the data in <componenttype:minecraft:dye_color>
      Returns:
      A DyedItemColor instance.
    • withDyedColor

      default T withDyedColor(int rgb, boolean showInTooltip)
      Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess.
      Parameters:
      rgb - The colour to dye this item with
      showInTooltip - Whether to show this information in a tooltip
      Returns:
      The new instance with the modified data.
      DocParam:
      rgb 0xFFFF00, showInTooltip true
    • withDyedColor

      default T withDyedColor(net.minecraft.world.item.component.DyedItemColor color)
      Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess to have the given DyedItemColor
      Returns:
      The new instance with the modified data.
    • withoutDyedColor

      default T withoutDyedColor()
      Removes the <componenttype:minecraft:dyed_color> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasMapColor

      default boolean hasMapColor()
      Checks whether the ComponentAccess has <componenttype:minecraft:map_color>
      Returns:
      Whether the componenttype is stored.
    • getMapColor

      default net.minecraft.world.item.component.MapItemColor getMapColor()
      Gets the data in <componenttype:minecraft:map_color>
      Returns:
      A MapItemColor that stores an RGB color..
    • withMapColor

      default T withMapColor(int rgb)
      Sets the <componenttype:minecraft:map_color> of the ComponentAccess.
      Parameters:
      rgb - The new map colour
      Returns:
      The new instance with the modified data.
      DocParam:
      rgb 0xFF0000
    • withMapColor

      default T withMapColor(net.minecraft.world.item.component.MapItemColor color)
      Sets the <componenttype:minecraft:map_color> of the ComponentAccess to have the given MapItemColor
      Returns:
      The new instance with the modified data.
    • withoutMapColor

      default T withoutMapColor()
      Removes the <componenttype:minecraft:map_color> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasMapId

      default boolean hasMapId()
      Checks whether the ComponentAccess has <componenttype:minecraft:map_id>
      Returns:
      Whether the componenttype is stored.
    • getMapId

      default net.minecraft.world.level.saveddata.maps.MapId getMapId()
      Gets the data in <componenttype:minecraft:map_id>
      Returns:
      A MapId
    • withMapId

      default T withMapId(int id)
      Sets the <componenttype:minecraft:map_id> of the ComponentAccess to have the given value. A map id is only useful after the game generates one to store data. Therefore, you should always pass in the parameter for an id you know is available.
      Returns:
      The new instance with the modified data.
    • withMapId

      default T withMapId(net.minecraft.world.level.saveddata.maps.MapId mapId)
      Sets the <componenttype:minecraft:map_id> of the ComponentAccess to have the given MapId
      Returns:
      The new instance with the modified data.
    • withoutMapId

      default T withoutMapId()
      Removes the <componenttype:minecraft:map_id> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasMapDecorations

      default boolean hasMapDecorations()
      Checks whether the ComponentAccess has <componenttype:minecraft:map_decorations> MapDecorations are additional elements that render on a map, such as waypoints.
      Returns:
      Whether the componenttype is stored.
    • getMapDecorations

      default net.minecraft.world.item.component.MapDecorations getMapDecorations()
      Gets the data in <componenttype:minecraft:map_decorations>
      Returns:
      A MapDecorations.
    • withMapDecorations

      default T withMapDecorations(Map<String,net.minecraft.world.item.component.MapDecorations.Entry> decorations)
      Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given values.
      Returns:
      The new instance with the modified data.
    • withMapDecorations

      default T withMapDecorations(net.minecraft.world.item.component.MapDecorations decorations)
      Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given MapDecorations
      Returns:
      The new instance with the modified data.
    • withoutMapDecorations

      default T withoutMapDecorations()
      Removes the <componenttype:minecraft:map_decorations> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasMapPostProcessing

      default boolean hasMapPostProcessing()
      Checks whether the ComponentAccess has <componenttype:minecraft:map_post_processing> This componenet stores additional info on the map, such as the scale or whether to lock it.
      Returns:
      Whether the componenttype is stored.
    • getMapPostProcessing

      default net.minecraft.world.item.component.MapPostProcessing getMapPostProcessing()
      Gets the data in <componenttype:minecraft:map_post_processing>
      Returns:
      A MapPostProcessing
    • withMapPostProcessing

      default T withMapPostProcessing(net.minecraft.world.item.component.MapPostProcessing value)
      Sets the <componenttype:minecraft:map_post_processing> of the ComponentAccess to have the given MapPostProcessing
      Returns:
      The new instance with the modified data.
    • withoutMapPostProcessing

      default T withoutMapPostProcessing()
      Removes the <componenttype:minecraft:map_post_processing> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasChargedProjectiles

      default boolean hasChargedProjectiles()
      Checks whether the ComponentAccess has <componenttype:minecraft:charged_projectiles> This component is used for crossbows.
      Returns:
      Whether the componenttype is stored.
    • getChargedProjectiles

      default net.minecraft.world.item.component.ChargedProjectiles getChargedProjectiles()
      Gets the data in <componenttype:minecraft:charged_projectiles>
      Returns:
      A ChargedProjectiles.
    • withChargedProjectiles

      default T withChargedProjectiles(IItemStack item)
      Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given IItemStack
      Parameters:
      item - The item to store within.
      Returns:
      The new instance with the modified data.
      DocParam:
      item invalid input: '<'item:minecraft:arrow>
    • withChargedProjectiles

      default T withChargedProjectiles(List<IItemStack> items)
      Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given items.
      Parameters:
      items - The items to store within.
      Returns:
      The new instance with the modified data.
      DocParam:
      items [invalid input: '<'item:minecraft:arrow>]
    • withChargedProjectiles

      default T withChargedProjectiles(net.minecraft.world.item.component.ChargedProjectiles chargedProjectiles)
      Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given ChargedProjectiles
      Returns:
      The new instance with the modified data.
    • withoutChargedProjectiles

      default T withoutChargedProjectiles()
      Removes the <componenttype:minecraft:charged_projectiles> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasBundleContents

      default boolean hasBundleContents()
      Checks whether the ComponentAccess has <componenttype:minecraft:bundle_contents>
      Returns:
      Whether the componenttype is stored.
    • getBundleContents

      default net.minecraft.world.item.component.BundleContents getBundleContents()
      Gets the data in <componenttype:minecraft:bundle_contents>
      Returns:
      A BundleContents.
    • withBundleContents

      default T withBundleContents(List<IItemStack> contents)
      Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given contents
      Parameters:
      contents - A list of items to store within.
      Returns:
      The new instance with the modified data.
      DocParam:
      contents [invalid input: '<'item:minecraft:diamond> * 64]
    • withBundleContents

      default T withBundleContents(net.minecraft.world.item.component.BundleContents contents)
      Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given BundleContents
      Returns:
      The new instance with the modified data.
    • withoutBundleContents

      default T withoutBundleContents()
      Removes the <componenttype:minecraft:bundle_contents> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasPotionContents

      default boolean hasPotionContents()
      Checks whether the ComponentAccess has <componenttype:minecraft:potion_contents> Stores Potion Data on an item.
      Returns:
      Whether the componenttype is stored.
    • getPotionContents

      default net.minecraft.world.item.alchemy.PotionContents getPotionContents()
      Gets the data in <componenttype:minecraft:potion_contents>
      Returns:
      A PotionContents.
    • withPotionContents

      default T withPotionContents(net.minecraft.world.item.alchemy.Potion potion)
      Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion and no custom effects
      Parameters:
      potion - The potion to store within
      Returns:
      The new instance with the modified data.
      DocParam:
      potion invalid input: '<'potion:minecraft:swiftness>
    • withPotionContents

      default T withPotionContents(net.minecraft.world.item.alchemy.Potion potion, List<net.minecraft.world.effect.MobEffectInstance> customEffects)
      Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion and the given MobEffectInstance effects.
      Parameters:
      potion - The potion to store within.
      customEffects - The effects to grant upon consuming this potion.
      Returns:
      The new instance with the modified data.
      DocParam:
      potion invalid input: '<'potion:minecraft:swiftness>, customEffects [MobEffectInstance.of(invalid input: '<'mobeffect:minecraft:strength>, 20 * 20, 1, false, false, true)]
    • withPotionContents

      default T withPotionContents(net.minecraft.world.item.alchemy.Potion potion, int customColor, List<net.minecraft.world.effect.MobEffectInstance> customEffects)
      Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion and the given MobEffectInstance effects.
      Parameters:
      potion - The potion to store within.
      customColor - The ARGB color the potion will have.
      customEffects - The effects to grant upon consuming this potion.
      Returns:
      The new instance with the modified data.
      DocParam:
      potion invalid input: '<'potion:minecraft:swiftness>, customColor 0xFFFFFF00, customEffects [MobEffectInstance.of(invalid input: '<'mobeffect:minecraft:strength>, 20 * 20, 1, false, false, true)]
    • withPotionContents

      default T withPotionContents(net.minecraft.world.item.alchemy.PotionContents contents)
      Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given PotionContents
      Returns:
      The new instance with the modified data.
    • withoutPotionContents

      default T withoutPotionContents()
      Removes the <componenttype:minecraft:potion_contents> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasSuspiciousStewEffects

      default boolean hasSuspiciousStewEffects()
      Checks whether the ComponentAccess has <componenttype:minecraft:suspicious_stew_effects>
      Returns:
      Whether the componenttype is stored.
    • getSuspiciousStewEffects

      default net.minecraft.world.item.component.SuspiciousStewEffects getSuspiciousStewEffects()
      Gets the data in <componenttype:minecraft:suspicious_stew_effects>
      Returns:
      A SuspiciousStewEffects.
    • withSuspiciousStewEffects

      default T withSuspiciousStewEffects(List<net.minecraft.world.item.component.SuspiciousStewEffects.Entry> effects)
      Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects SuspiciousStewEffects.Entry is effectively a pair of Effect and duration.
      Parameters:
      effects - The list of effects to grant on consumption.
      Returns:
      The new instance with the modified data.
    • withSuspiciousStewEffects

      default T withSuspiciousStewEffects(net.minecraft.world.item.component.SuspiciousStewEffects suspiciousStewEffects)
      Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects
      Returns:
      The new instance with the modified data.
    • withoutSuspiciousStewEffects

      default T withoutSuspiciousStewEffects()
      Removes the <componenttype:minecraft:suspicious_stew_effects> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasWritableBookContent

      default boolean hasWritableBookContent()
      Checks whether the ComponentAccess has <componenttype:minecraft:writable_book_content>
      Returns:
      Whether the componenttype is stored.
    • getWritableBookContent

      default net.minecraft.world.item.component.WritableBookContent getWritableBookContent()
      Gets the data in <componenttype:minecraft:writable_book_content>
      Returns:
      A WritableBookContent.
    • withWritableBookContent

      default T withWritableBookContent(List<net.minecraft.server.network.Filterable<String>> pages)
      Returns:
      The new instance with the modified data.
    • withWritableBookContent

      default T withWritableBookContent(net.minecraft.world.item.component.WritableBookContent content)
      Sets the <componenttype:minecraft:writable_book_content> of the ComponentAccess to have the given WritableBookContent
      Returns:
      The new instance with the modified data.
    • withoutWritableBookContent

      default T withoutWritableBookContent()
      Removes the <componenttype:minecraft:writable_book_content> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasWrittenBookContent

      default boolean hasWrittenBookContent()
      Checks whether the ComponentAccess has <componenttype:minecraft:written_book_content>
      Returns:
      Whether the componenttype is stored.
    • getWrittenBookContent

      default net.minecraft.world.item.component.WrittenBookContent getWrittenBookContent()
      Gets the data in <componenttype:minecraft:written_book_content>
      Returns:
      A WrittenBookContent.
    • withWrittenBookContent

      default T withWrittenBookContent(net.minecraft.world.item.component.WrittenBookContent content)
      Sets the <componenttype:minecraft:written_book_content> of the ComponentAccess to have the given WrittenBookContent
      Returns:
      The new instance with the modified data.
    • withoutWrittenBookContent

      default T withoutWrittenBookContent()
      Removes the <componenttype:minecraft:written_book_content> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasTrim

      default boolean hasTrim()
      Checks whether the ComponentAccess has <componenttype:minecraft:trim>
      Returns:
      Whether the componenttype is stored.
    • getTrim

      default net.minecraft.world.item.armortrim.ArmorTrim getTrim()
      Gets the data in <componenttype:minecraft:trim>
      Returns:
      A ArmorTrim.
    • withTrim

      default T withTrim(net.minecraft.world.item.armortrim.ArmorTrim trim)
      Sets the <componenttype:minecraft:trim> of the ComponentAccess to have the given ArmorTrim
      Returns:
      The new instance with the modified data.
    • withoutTrim

      default T withoutTrim()
      Removes the <componenttype:minecraft:trim> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasDebugStickState

      default boolean hasDebugStickState()
      Checks whether the ComponentAccess has <componenttype:minecraft:debug_stick_state>
      Returns:
      Whether the componenttype is stored.
    • getDebugStickState

      default net.minecraft.world.item.component.DebugStickState getDebugStickState()
      Gets the data in <componenttype:minecraft:debug_stick_state>
      Returns:
      A DebugStickState.
    • withDebugStickState

      default T withDebugStickState(net.minecraft.world.item.component.DebugStickState state)
      Sets the <componenttype:minecraft:debug_stick_state> of the ComponentAccess to have the given DebugStickState
      Returns:
      The new instance with the modified data.
    • withoutDebugStickState

      default T withoutDebugStickState()
      Removes the <componenttype:minecraft:debug_stick_state> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasEntityData

      default boolean hasEntityData()
      Checks whether the ComponentAccess has <componenttype:minecraft:entity_data>
      Returns:
      Whether the componenttype is stored.
    • getEntityData

      default net.minecraft.world.item.component.CustomData getEntityData()
      Gets the data in <componenttype:minecraft:entity_data>
      Returns:
      A CustomData.
    • withEntityData

      default T withEntityData(MapData data)
      Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given MapData
      Returns:
      The new instance with the modified data.
    • withEntityData

      default T withEntityData(net.minecraft.world.item.component.CustomData data)
      Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given CustomData
      Returns:
      The new instance with the modified data.
    • withoutEntityDate

      default T withoutEntityDate()
      Removes the <componenttype:minecraft:entity_data> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasBucketEntityData

      default boolean hasBucketEntityData()
      Checks whether the ComponentAccess has <componenttype:minecraft:bucket_entity_data>
      Returns:
      Whether the componenttype is stored.
    • getBucketEntityData

      default net.minecraft.world.item.component.CustomData getBucketEntityData()
      Gets the data in <componenttype:minecraft:bucket_entity_data>
      Returns:
      A CustomData.
    • withBucketEntityData

      default T withBucketEntityData(MapData data)
      Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given MapData
      Returns:
      The new instance with the modified data.
    • withBucketEntityData

      default T withBucketEntityData(net.minecraft.world.item.component.CustomData data)
      Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given CustomData
      Returns:
      The new instance with the modified data.
    • withoutBucketEntityData

      default T withoutBucketEntityData()
      Removes the <componenttype:minecraft:bucket_entity_data> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasBlockEntityData

      default boolean hasBlockEntityData()
      Checks whether the ComponentAccess has <componenttype:minecraft:block_entity_data>
      Returns:
      Whether the componenttype is stored.
    • getBlockEntityData

      default net.minecraft.world.item.component.CustomData getBlockEntityData()
      Gets the data in <componenttype:minecraft:block_entity_data>
      Returns:
      A CustomData.
    • withBlockEntityData

      default T withBlockEntityData(MapData data)
      Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given MapData
      Returns:
      The new instance with the modified data.
    • withBlockEntityData

      default T withBlockEntityData(net.minecraft.world.item.component.CustomData data)
      Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given CustomData
      Returns:
      The new instance with the modified data.
    • withoutBlockEntityData

      default T withoutBlockEntityData()
      Removes the <componenttype:minecraft:block_entity_data> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasInstrument

      default boolean hasInstrument()
      Checks whether the ComponentAccess has <componenttype:minecraft:instrument>
      Returns:
      Whether the componenttype is stored.
    • getInstrument

      default net.minecraft.world.item.Instrument getInstrument()
      Gets the data in <componenttype:minecraft:instrument>
      Returns:
      A Instrument.
    • withInstrument

      default T withInstrument(net.minecraft.world.item.Instrument instrument)
      Sets the <componenttype:minecraft:instrument> of the ComponentAccess to have the given Instrument
      Returns:
      The new instance with the modified data.
    • withoutInstrument

      default T withoutInstrument()
      Removes the <componenttype:minecraft:instrument> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasOminousBottleAmplifier

      default boolean hasOminousBottleAmplifier()
      Checks whether the ComponentAccess has <componenttype:minecraft:ominous_bottle_amplifier>
      Returns:
      Whether the componenttype is stored.
    • getOminousBottleAmplifier

      default int getOminousBottleAmplifier()
      Gets the data in <componenttype:minecraft:ominous_bottle_amplifier>
      Returns:
      The amplifier number.
    • withOminousBottleAmplifier

      default T withOminousBottleAmplifier(int amplifier)
      Sets the <componenttype:minecraft:ominous_bottle_amplifier> of the ComponentAccess to have the given amplifier.
      Returns:
      The new instance with the modified data.
    • withoutOminousBottleAmplifier

      default T withoutOminousBottleAmplifier()
      Removes the <componenttype:minecraft:ominous_bottle_amplifier> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasRecipes

      default boolean hasRecipes()
      Checks whether the ComponentAccess has <componenttype:minecraft:recipes> Used for Knowledge Books.
      Returns:
      Whether the componenttype is stored.
    • getRecipes

      default List<net.minecraft.resources.ResourceLocation> getRecipes()
      Gets the data in <componenttype:minecraft:recipes>
      Returns:
      A List<net.minecraft.resources.ResourceLocation>.
    • withRecipes

      default T withRecipes(List<net.minecraft.resources.ResourceLocation> recipes)
      Sets the <componenttype:minecraft:recipes> of the ComponentAccess to have the given List<net.minecraft.resources.ResourceLocation>
      Returns:
      The new instance with the modified data.
    • withoutRecipes

      default T withoutRecipes()
      Removes the <componenttype:minecraft:recipes> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasLodestoneTracker

      default boolean hasLodestoneTracker()
      Checks whether the ComponentAccess has <componenttype:minecraft:lodestone_tracker>
      Returns:
      Whether the componenttype is stored.
    • getLodestoneTracker

      default net.minecraft.world.item.component.LodestoneTracker getLodestoneTracker()
      Gets the data in <componenttype:minecraft:lodestone_tracker>
      Returns:
      A LodestoneTracker.
    • withLodestoneTracker

      default T withLodestoneTracker(net.minecraft.world.item.component.LodestoneTracker tracker)
      Sets the <componenttype:minecraft:lodestone_tracker> of the ComponentAccess to have the given LodestoneTracker
      Returns:
      The new instance with the modified data.
    • withoutLodestoneTracker

      default T withoutLodestoneTracker()
      Removes the <componenttype:minecraft:lodestone_tracker> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasFireworkExplosion

      default boolean hasFireworkExplosion()
      Checks whether the ComponentAccess has <componenttype:minecraft:firework_explosion>
      Returns:
      Whether the componenttype is stored.
    • getFireworkExplosion

      default net.minecraft.world.item.component.FireworkExplosion getFireworkExplosion()
      Gets the data in <componenttype:minecraft:firework_explosion>
      Returns:
      A FireworkExplosion.
    • withFireworkExplosion

      default T withFireworkExplosion(net.minecraft.world.item.component.FireworkExplosion explosion)
      Sets the <componenttype:minecraft:firework_explosion> of the ComponentAccess to have the given FireworkExplosion
      Returns:
      The new instance with the modified data.
    • withoutFireworkExplosion

      default T withoutFireworkExplosion()
      Removes the <componenttype:minecraft:firework_explosion> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasFireworks

      default boolean hasFireworks()
      Checks whether the ComponentAccess has <componenttype:minecraft:fireworks>
      Returns:
      Whether the componenttype is stored.
    • getFireworks

      default net.minecraft.world.item.component.Fireworks getFireworks()
      Gets the data in <componenttype:minecraft:fireworks>
      Returns:
      A Fireworks.
    • withFireworks

      default T withFireworks(int flightDuration, List<net.minecraft.world.item.component.FireworkExplosion> explosions)
      Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given duration and explosions.
      Returns:
      The new instance with the modified data.
    • withFireworks

      default T withFireworks(net.minecraft.world.item.component.Fireworks fireworks)
      Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given Fireworks
      Returns:
      The new instance with the modified data.
    • withoutFireworks

      default T withoutFireworks()
      Removes the <componenttype:minecraft:fireworks> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasProfile

      default boolean hasProfile()
      Checks whether the ComponentAccess has <componenttype:minecraft:profile>
      Returns:
      Whether the componenttype is stored.
    • getProfile

      default net.minecraft.world.item.component.ResolvableProfile getProfile()
      Gets the data in <componenttype:minecraft:profile>
      Returns:
      A ResolvableProfile.
    • withProfile

      default T withProfile(net.minecraft.world.item.component.ResolvableProfile profile)
      Sets the <componenttype:minecraft:profile> of the ComponentAccess to have the given ResolvableProfile
      Returns:
      The new instance with the modified data.
    • withoutProfile

      default T withoutProfile()
      Removes the <componenttype:minecraft:profile> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasNoteBlockSound

      default boolean hasNoteBlockSound()
      Checks whether the ComponentAccess has <componenttype:minecraft:note_block_sound>
      Returns:
      Whether the componenttype is stored.
    • getNoteBlockSound

      default net.minecraft.resources.ResourceLocation getNoteBlockSound()
      Gets the data in <componenttype:minecraft:note_block_sound>
      Returns:
      A ResourceLocation.
    • withNoteBlockSound

      default T withNoteBlockSound(net.minecraft.resources.ResourceLocation sound)
      Sets the <componenttype:minecraft:note_block_sound> of the ComponentAccess to have the given ResourceLocation
      Returns:
      The new instance with the modified data.
    • withoutNoteBlockSound

      default T withoutNoteBlockSound()
      Removes the <componenttype:minecraft:note_block_sound> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasBannerPatterns

      default boolean hasBannerPatterns()
      Checks whether the ComponentAccess has <componenttype:minecraft:banner_patterns>
      Returns:
      Whether the componenttype is stored.
    • getBannerPatterns

      default net.minecraft.world.level.block.entity.BannerPatternLayers getBannerPatterns()
      Gets the data in <componenttype:minecraft:banner_patterns>
      Returns:
      A BannerPatternLayers.
    • withBannerPatterns

      default T withBannerPatterns(List<net.minecraft.world.level.block.entity.BannerPatternLayers.Layer> layers)
      Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given List<net.minecraft.world.level.block.entity.BannerPatternLayers.Layer>
      Returns:
      The new instance with the modified data.
    • withBannerPatterns

      default T withBannerPatterns(net.minecraft.world.level.block.entity.BannerPatternLayers layers)
      Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given BannerPatternLayers
      Returns:
      The new instance with the modified data.
    • withoutBannerPatterns

      default T withoutBannerPatterns()
      Removes the <componenttype:minecraft:banner_patterns> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasBaseColor

      default boolean hasBaseColor()
      Checks whether the ComponentAccess has <componenttype:minecraft:base_color> Used for shield colouring.
      Returns:
      Whether the componenttype is stored.
    • getBaseColor

      default net.minecraft.world.item.DyeColor getBaseColor()
      Gets the data in <componenttype:minecraft:base_color>
      Returns:
      A DyeColor.
    • withBaseColor

      default T withBaseColor(net.minecraft.world.item.DyeColor color)
      Sets the <componenttype:minecraft:base_color> of the ComponentAccess to have the given DyeColor
      Returns:
      The new instance with the modified data.
    • withoutBaseColor

      default T withoutBaseColor()
      Removes the <componenttype:minecraft:base_color> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasPotDecorations

      default boolean hasPotDecorations()
      Checks whether the ComponentAccess has <componenttype:minecraft:pot_decorations>
      Returns:
      Whether the componenttype is stored.
    • getPotDecorations

      default net.minecraft.world.level.block.entity.PotDecorations getPotDecorations()
      Gets the data in <componenttype:minecraft:pot_decorations>
      Returns:
      A PotDecorations.
    • withPotDecorations

      default T withPotDecorations(net.minecraft.world.item.Item back, net.minecraft.world.item.Item left, net.minecraft.world.item.Item right, net.minecraft.world.item.Item front)
      Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given items.
      Returns:
      The new instance with the modified data.
    • withPotDecorations

      default T withPotDecorations(net.minecraft.world.level.block.entity.PotDecorations decorations)
      Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given PotDecorations
      Returns:
      The new instance with the modified data.
    • withoutPotDecorations

      default T withoutPotDecorations()
      Removes the <componenttype:minecraft:pot_decorations> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasContainer

      default boolean hasContainer()
      Checks whether the ComponentAccess has <componenttype:minecraft:container>
      Returns:
      Whether the componenttype is stored.
    • getContainer

      default net.minecraft.world.item.component.ItemContainerContents getContainer()
      Gets the data in <componenttype:minecraft:container>
      Returns:
      A ItemContainerContents.
    • withContainer

      default T withContainer(List<IItemStack> contents)
      Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given values.
      Returns:
      The new instance with the modified data.
    • withContainer

      default T withContainer(net.minecraft.world.item.component.ItemContainerContents contents)
      Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given ItemContainerContents
      Returns:
      The new instance with the modified data.
    • withoutContainer

      default T withoutContainer()
      Removes the <componenttype:minecraft:container> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasBlockState

      default boolean hasBlockState()
      Checks whether the ComponentAccess has <componenttype:minecraft:block_state>
      Returns:
      Whether the componenttype is stored.
    • getBlockState

      default net.minecraft.world.item.component.BlockItemStateProperties getBlockState()
      Gets the data in <componenttype:minecraft:block_state>
      Returns:
      A BlockItemStateProperties.
    • withBlockState

      default T withBlockState(net.minecraft.world.item.component.BlockItemStateProperties properties)
      Sets the <componenttype:minecraft:block_state> of the ComponentAccess to have the given BlockItemStateProperties
      Returns:
      The new instance with the modified data.
    • withoutBlockState

      default T withoutBlockState()
      Removes the <componenttype:minecraft:block_state> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasBees

      default boolean hasBees()
      Checks whether the ComponentAccess has <componenttype:minecraft:bees>
      Returns:
      Whether the componenttype is stored.
    • getBees

      default List<net.minecraft.world.level.block.entity.BeehiveBlockEntity.Occupant> getBees()
      Gets the data in <componenttype:minecraft:bees>
      Returns:
      A List<net.minecraft.world.level.block.entity.BeehiveBlockEntity.Occupant>.
    • withBees

      default T withBees(List<net.minecraft.world.level.block.entity.BeehiveBlockEntity.Occupant> occupants)
      Sets the <componenttype:minecraft:bees> of the ComponentAccess to have the given occupants
      Returns:
      The new instance with the modified data.
    • withoutBees

      default T withoutBees()
      Removes the <componenttype:minecraft:bees> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasLock

      default boolean hasLock()
      Checks whether the ComponentAccess has <componenttype:minecraft:lock>
      Returns:
      Whether the componenttype is stored.
    • getLock

      default net.minecraft.world.LockCode getLock()
      Gets the data in <componenttype:minecraft:lock>
      Returns:
      A LockCode.
    • withLock

      default T withLock(String code)
      Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given string.
      Returns:
      The new instance with the modified data.
    • withLock

      default T withLock(net.minecraft.world.LockCode lock)
      Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given LockCode
      Returns:
      The new instance with the modified data.
    • withoutLock

      default T withoutLock()
      Removes the <componenttype:minecraft:lock> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • hasContainerLoot

      default boolean hasContainerLoot()
      Checks whether the ComponentAccess has <componenttype:minecraft:container_loot>
      Returns:
      Whether the componenttype is stored.
    • getContainerLoot

      default net.minecraft.world.item.component.SeededContainerLoot getContainerLoot()
      Gets the data in <componenttype:minecraft:container_loot>
      Returns:
      A SeededContainerLoot.
    • withContainerLoot

      default T withContainerLoot(net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> lootTable, long seed)
      Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given loot table and seed.
      Returns:
      The new instance with the modified data.
    • withContainerLoot

      default T withContainerLoot(net.minecraft.world.item.component.SeededContainerLoot loot)
      Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given SeededContainerLoot
      Returns:
      The new instance with the modified data.
    • withoutContainerLoot

      default T withoutContainerLoot()
      Removes the <componenttype:minecraft:container_loot> from the ComponentAccess.
      Returns:
      The new instance with the modified data.
    • _get

      <U> U _get(net.minecraft.core.component.DataComponentType<? extends U> componentType)
    • _with

      <U> T _with(net.minecraft.core.component.DataComponentType<U> componentType, @Nullable U value)
    • _without

      <U> T _without(net.minecraft.core.component.DataComponentType<U> componentType)
    • _has

      <U> boolean _has(net.minecraft.core.component.DataComponentType<U> componentType)