Skip to content

How creating crafting table result slot event. #2396

Discussion options

You must be logged in to vote

Please don't post minecraft source here. Just reference the method name and describe the part you are interested in.

The dropItem() is for when the item doesn't fit in the player's inventory, it drops the item on the ground.

The onCrafted() is to allow items to add default nbt for newly crafted items and to update crafting statistics.
The loop is is to update the crafting grid to decrease/remove items used in the craft.

If you want to detect the player taking an item from the result slot just @Inject at the HEAD of the onTakeItem() method.
i.e. the start of that method before all the processing of the craft starts

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Intezium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants