Package net.fabricmc.fabric.api.item.v1
Interface DefaultItemComponentEvents.ModifyContext
- Enclosing class:
DefaultItemComponentEvents
public static interface DefaultItemComponentEvents.ModifyContext
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidmodify(Collection<Item> items, BiConsumer<ComponentMap.Builder, Item> builderConsumer) Modify the default data components of the specified items.voidmodify(Predicate<Item> itemPredicate, BiConsumer<ComponentMap.Builder, Item> builderConsumer) Modify the default data components of the specified item.default voidmodify(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.Builderto 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.Builderto 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.Builderto modify the item's components.
-