-
Notifications
You must be signed in to change notification settings - Fork 519
Description
Nowadays you usually don't need to to make your own class for items, many things can be done with components. However, FabricItem requires you to have a subclass as the way you use it is by overriding the methods it adds.
Additionally, if Mojang continues to make items "data-driven" and, e.g., makes Item class a record, FabricItem would have to be removed and its features implemented in other ways.
I imagine allowComponentsUpdateAnimation and allowContinuingBlockBreaking can be replaced with something like ClientItemEvents#SWAP_ANIMATION and ClientItemEvents#RESET_BREAKING_PROGRESS.
EnchantmentEvents#ALLOW_ENCHANTING already exists doing similar thing to FabricItem#canBeEnchantedWith, but the latter is still directly called from some mixins.
getCraftingRemainder and getCreatorNamespace can also be replaced with new events or with some sort of registry.