Artisan Worktables 1.12

Artisan Worktables 1.12

3M Downloads

ItemCraftedEvent does not actually receive the crafted ItemStack

tuxmonkey opened this issue ยท 1 comments

commented

The ItemStack associated with the ItemCraftEvent for the tables does not appear to be the actual ItemStack that is a result of the crafting. Subscribing to the event and attempting to modify it in any way does nothing.

Example:

public static void onCraftItem(ItemCraftedEvent event)
{
        ItemStack stack = event.crafting;
        if (!stack.isEmpty()) {
            stack.setStackDisplayName("Test Item");
        }
}

With a vanilla crafting table this triggers fine and the display name for the stack is changed but with the artisan tables the event triggers but no modifications actually take effect.

commented

You're correct! :)

This was an intentional design decision, but I don't remember the reasoning behind the decision right now. I'll dig into it when I have time, and if I can't find a reason to keep it the way it is, I'll open up the item stack for modification.