Package net.fabricmc.fabric.api.item.v1
Interface DefaultItemComponentEvents.ModifyContext
- Enclosing class:
DefaultItemComponentEvents
public static interface DefaultItemComponentEvents.ModifyContext
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
modify
(Collection<Item> items, BiConsumer<ComponentMap.Builder, Item> builderConsumer) Modify the default data components of the specified items.void
modify
(Predicate<Item> itemPredicate, BiConsumer<ComponentMap.Builder, Item> builderConsumer) Modify the default data components of the specified item.default void
modify
(Item item, Consumer<ComponentMap.Builder> builderConsumer) Modify the default data components of the specified item.
-
Method Details
-
modify
Modify the default data components of the specified item.- Parameters:
itemPredicate
- A predicate to match items to modifybuilderConsumer
- A consumer that provides aComponentMap.Builder
to modify the item's components.
-
modify
Modify the default data components of the specified item.- Parameters:
item
- The item to modifybuilderConsumer
- A consumer that provides aComponentMap.Builder
to modify the item's components.
-
modify
Modify the default data components of the specified items.- Parameters:
items
- The items to modifybuilderConsumer
- A consumer that provides aComponentMap.Builder
to modify the item's components.
-