Interface DefaultItemComponentEvents.ModifyContext
- Enclosing class:
DefaultItemComponentEvents
public static interface DefaultItemComponentEvents.ModifyContext
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidmodify(Collection<net.minecraft.world.item.Item> items, BiConsumer<net.minecraft.core.component.DataComponentMap.Builder, net.minecraft.world.item.Item> builderConsumer) Modify the default data components of the specified items.voidmodify(Predicate<net.minecraft.world.item.Item> itemPredicate, BiConsumer<net.minecraft.core.component.DataComponentMap.Builder, net.minecraft.world.item.Item> builderConsumer) Modify the default data components of the specified item.default voidmodify(net.minecraft.world.item.Item item, Consumer<net.minecraft.core.component.DataComponentMap.Builder> builderConsumer) Modify the default data components of the specified item.
-
Method Details
-
modify
void modify(Predicate<net.minecraft.world.item.Item> itemPredicate, BiConsumer<net.minecraft.core.component.DataComponentMap.Builder, net.minecraft.world.item.Item> builderConsumer) Modify the default data components of the specified item.- Parameters:
itemPredicate- A predicate to match items to modifybuilderConsumer- A consumer that provides aDataComponentMap.Builderto modify the item's components.
-
modify
default void modify(net.minecraft.world.item.Item item, Consumer<net.minecraft.core.component.DataComponentMap.Builder> builderConsumer) Modify the default data components of the specified item.- Parameters:
item- The item to modifybuilderConsumer- A consumer that provides aDataComponentMap.Builderto modify the item's components.
-
modify
default void modify(Collection<net.minecraft.world.item.Item> items, BiConsumer<net.minecraft.core.component.DataComponentMap.Builder, net.minecraft.world.item.Item> builderConsumer) Modify the default data components of the specified items.- Parameters:
items- The items to modifybuilderConsumer- A consumer that provides aDataComponentMap.Builderto modify the item's components.
-