Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Action(IForgeAction&IForgeArmPose) #46

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Ecdcaeb
Copy link
Contributor

@Ecdcaeb Ecdcaeb commented Jan 21, 2024

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.

@kappa-maintainer
Copy link
Collaborator

Looks good, please wait for Rong

@Ecdcaeb Ecdcaeb changed the base branch from main to experimental/foundation June 6, 2024 02:05
@Ecdcaeb Ecdcaeb changed the base branch from experimental/foundation to main October 18, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants