Posts posted by AikonCWD
-
-
Hi all,
I'm trying to "do things" when an item is crafted. But for some reason, after crafting one item (diamond sword), the event triggers twice. Here is the code:
@SubscribeEvent public static void onCrafting(PlayerEvent.ItemCraftedEvent event) { ItemStack items = event.getCrafting(); System.out.println("--------------"); System.out.println("Description ID: " + items.getItem().getDescriptionId()); System.out.println("Count: " + items.getCount()); }
And here is the output:
I am missing something, for sure, can you help me with this? Thanks :)
[1.19.2] ItemCraftedEvent triggers twice for each crafted item
in Modder Support
Thanks. Im assuming I need to check if the event is clientside, right? My mod will be client only.