Cleanroom icon indicating copy to clipboard operation
Cleanroom copied to clipboard

Expand Action(IForgeAction&IForgeArmPose)

Open Ecdcaeb opened this issue 2 years ago • 1 comments

expand the EnumAction and ArmPose but remain the vanillan if.

The Functional Interface

We use functional interface to expand the EnumAction and ArmPose. This design is from the forge hook of EnumEnchantmentType. Usually, we use EnumHelper to add a enum, this means what we could do is just aload a reference. We could not override it, this is why we use functional interface to expand it.

The Legacy Mods

As far as i know, there are lots of mods have impled the expandation of EnumAction or ArmPose use their own mixin or asm.

To preserve compatibility, I don't remove the original if chain, although using polymorphism would look nicer now.

Ecdcaeb avatar Jan 21 '24 02:01 Ecdcaeb

Looks good, please wait for Rong

kappa-maintainer avatar Jan 21 '24 03:01 kappa-maintainer