Interface PlayerEvent.CraftItem
- Enclosing interface:
- PlayerEvent
public static interface PlayerEvent.CraftItem
-
Method Summary
Modifier and TypeMethodDescriptionvoid
craft
(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack constructed, net.minecraft.world.Container inventory) Invoked when a player crafts an item.
-
Method Details
-
craft
void craft(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack constructed, net.minecraft.world.Container inventory) Invoked when a player crafts an item. Equivalent to Forge'sItemCraftedEvent
event. This only applies for the vanilla crafting table (or any crafting table using theResultSlot
) and the player inventory crafting grid. This is invoked when the player takes something out of the result slot.- Parameters:
player
- The player.constructed
- The ItemStack that has been crafted.inventory
- The inventory of the constructor.
-