jfmekker / AurumancyMod

Gold-based magic mod for Minecraft 1.15.2 using Forge.
MIT License
0 stars 0 forks source link

[Refactor] Merge AbstractMagicItem usage functions #10

Closed jfmekker closed 3 years ago

jfmekker commented 3 years ago

The usage functions (chargedUsage, blockUsage, and instantUsage) should be able to all be merged. Create one abstract function to override that takes world, player, itemstack, etc as arguments.

jfmekker commented 3 years ago

One difference with the blockUsage is the ItemUseContext contains a RayTraceHitResult (which includes a Face/Side and direction). If that won't be needed then it will be fine. Maybe that can be a Nullable argument.

jfmekker commented 3 years ago

Closed with commit 7a9e3221 which merged everything to an onMagicItemUse function.