Introduce `PlayerEvent.ItemSmithingEvent` alongside the cleanup of other 'crafting events'
- Adds
ItemSmithingEventupdated to 1.21.7. Supersedes #1693. Closes #1569 - Make all crafting event classes follow a pattern of having the '-ing' suffix at the end.
- Rename the
ItemStacks in the respective events toresultto have more clarity. - Adds comments to various methods
- [ ] Publish PR to GitHub Packages
@Spinoscythe, this PR introduces breaking changes. Fortunately, this project is currently accepting breaking changes, but if they are not intentional, please revert them. Last checked commit: f2b0599b3aa8794e0cd3089106baabc949cf432f.
neoforge (:neoforge)
net/neoforged/neoforge/event/entity/player/PlayerEvent$ItemCraftedEventgetCrafting()Lnet/minecraft/world/item/ItemStack;: ❗ API method was removed
net/neoforged/neoforge/event/entity/player/PlayerEvent$ItemSmeltedEventgetSmelting()Lnet/minecraft/world/item/ItemStack;: ❗ API method was removed
net/neoforged/neoforge/event/EventHooksfirePlayerCraftingEvent(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/Container;)V: ❗ API method was removed
The naming scheme of the existing events is, in my opinion, followed very loosely. For example, the method firePlayerCraftingEvent vs the class PlayerEvent.ItemCraftedEvent. For this, we have 2 options: 1. rename the firePlayerCraftingEvent, or 2. update to the new naming scheme proposed in this PR.
If you prefer, I can do the first of the 2 options rather than the second.
I would prefer keeping the names of the existing events and hook methods as-is. Renaming the firePlayerCraftingEvent() method provides marginal benefits at best and the naming scheme not being followed to the full extent doesn't change anything about the proposed event names being plain wrong.