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

Soul Fire'd API integration (1.19.2) #443

Open
wants to merge 7 commits into
base: 1.19
Choose a base branch
from

Conversation

Crystal-Spider
Copy link

@Crystal-Spider Crystal-Spider commented Oct 17, 2023

Soul Fire'd is a mod of mine with a dual aim:

  1. Add actually unique properties to Soul Fire.
  2. Provide an easy-to-use API for other mods to register their own, or even of other mods, custom fires and having everything automatically handled.

I saw that Infernal Expansion can benefit in both cases as it currently is:

  • Having its own small API to register some specific fires, either its owns, of other mods, or of Minecraft.
  • Handling fires visual effects and some other fire-related stuff.

By integrating the Soul Fire'd API, Infernal Expansion gets more streamlined code, removal of some mixins, easier fire handling, and more optional features (e.g. enchantments handling, easy fire source and campfire handling, etc.).
Furthermore, Vanilla fire and soul fire are already handled without needing explicit references in your code.
I also plan to expand the ecosystem with further PRs to other mods, such that they are all compatible with each other and there's less need for you to register others' fires.

If this PR is accepted, I will also start working for 1.16.5 and 1.18.2 PRs (or for whichever branch is better, maybe release-3.0?).

Lastly, I know it's not always the best to add dependency to other mods as that might slow down future versions rollouts, but I can assure you, as the Soul Fire'd API developer, that it's always going to come out very soon for newer versions (and you can already see it by the wide range of Minecraft versions supported and actively mantained).

Let me know if I did anything wrong when contributing or if something is not clear, or really anything in general.

Changes summary:

  • build.gradle
    Added Soul Fire'd dependency.

  • Mixins
    Removed MixinEntityRendererManager, MixinOverlayRenderer, and MixinEntity.
    Changed MixinModelBakery and MixinAbstractFireBlock (removed now useless bits).

  • Old fire internal API
    Removed FireTypeAccess, FireType, and ClientFireType.
    Changed registration of fires in IEFireTypes.

@Crystal-Spider
Copy link
Author

I want to add that since version 3.2.0.0 it's also possible to introduce a soft dependency with a datapack rather than as I did with code.
I did it with code because anyway I had to rework how fires were handled in IE, but it could also be possible to remove entirely the code that handles fires and use a datapack instead.
In the datapack case, and because in IE the fire mechanics are required, Soul Fire'd would still need to be listed as a required dependency to make everything work as needed.

@Crystal-Spider
Copy link
Author

Little update: I opened a while ago a similar PR to BYG and they recently merged it and they are now in the process of porting SF dependency to all supported Minecraft versions.

This means:

  1. SF ecosystem is indeed expanding.
  2. BYG fire handling won't be explicitly needed anymore: just requiring SF as a dependency of IE will ensure that, when BYG is installed, its fires are handled too!

As soon as BYG releases a new version with the changes from the PR, I'll make sure to update the code of this PR too to remove the now useless BYG fire handling.

…s Soul Fire'd support built-in. This means their fires are already handled when SF is present.
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.

1 participant