[1.20.4][Mod Integration][Botania] Make Pies edible for Kekimurus #901
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Intro
The Kekimurus in Botania is known for generating mana from eating cakes. Botania's code only checks for
CakeBlock
and thus only vanilla cake and some modded cakes.Since FD's pies(including the sweet berry cheesecake) behaves like vanilla cake, it's reasonable for pies to have integration with Kekimurus.
It's possible to make this integration on Botania's side, but that would be requiring Botania to compile against FD. Since I found a way to implement it on FD's side without needing to compile against Botania, I believe making a PR to FD would be better.
Related Discord discussion
Implementation
This PR used a
@Pseudo
mixin on theKekimurusBlockEntity
to avoid adding Botania as a hard dependency on compile time.Not having Botania on the compile classpath results in not being able to call Botania specific methods in the mixin, however with MixinExtras, a safe and possibly more coremod-compatible implementation could be made. The mixin result will basically be equivalent to the code below:
Click to uncollapse
Changes
MixinExtras is now embedded in the mod's jar using Forge's jar in jar, so no extra dependency for players is introduced. Since NeoForge 20.2.84+ includes MixinExtras already, removing the embedded dependency when FD updates to NeoForge is possible.
The only change for the building workflow is that now the
jarJar
task should be used to create the jar used for production instead of the originaljar
task.Discussion
The Kekimurus generates 1800 mana per bite for all cakes, currently I let the pie use the same value. However, since pie slices are generally better than cake slices, and pies only have 4 bites comparing to cake's 7 bites, we might should consider a proper value for the mana generated per bite for pies.
My current preferred value is 3200 mana, which is 12800 mana in total, while for cake it's 12600 mana in total.
Of course, this value should be made tweakable through config, but we still need some discussion to determine a default value.
If the discussion results in rejecting this integration PR, I shall port it to Create: Central Kitchen for those who're interested in it :)