Add support for Soul Fire'd and fix a bug#60
Open
Crystal-Spider wants to merge 3 commits into
Open
Conversation
…neshotted by hellfork or soulfork tridents.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR main focus is to add support to Soul Fire'd, but I also noticed and fixed a bug affecting both Hellfork and Soulfork.
First of all, I had to update the Gradle distribution version to 8.8 and Loom to 1.5-SNAPSHOT to build the project. For the same reason, I also had to remove some
.build()calls from the loot table modify event.Secondly, I added Soul Fire'd v4.0.0 to the project as an optional dependency.
Lastly, I noticed that entities killed by both Hellfork and Soulfork would drop raw food, so I fixed that. As I was doing this, I also added a new abstract class to reduce code duplication between the two tridents.
Fixes Impaled #44 and Soul Fire'd #19.
If compatibility for Soul Fire'd gets added, I will add Impaled to the public list of mods that support Soul Fire'd. Let me know if you don't want this.
If you have any question let me know!
List of changes:
gradle-wrapper.propertiesto go from Gradle8.5to8.8.build.gradleto upgrade Loom from1.4-SNAPSHOTto1.5-SNAPSHOT.build.gradleto add Crystal Nest Maven repo (Soul Fire'd is hosted there), Fuzs repo (FCAP, a required dependency for Soul Fire'd, is hosted there), and add Soul Fire'dmodImplementation.gradle.propertiesto addsoul_fired_d_version.fabric.mod.jsonto declare Soul Fire'd as an optional dependency.ladysnake/impaled/common/Impaled.javato fix compile errors.ladysnake/impaled/common/init/ImpaledItems.javato remove redundant calls to.fireproof()when instantiating Hellfork items.ladysnake/impaled/compat/SoulFired.javaclass to handle the optional dependency and compatibility.ladysnake/impaled/common/item/HellforkItem.javato useSoulFired.javaclass method if the item is a Soulfork one and Soul Fire'd is loaded at runtime.ladysnake/impaled/common/entity/FireTridentEntity.javaabstract class to greatly reduce code duplication betweenSoulforkEntityandHellforkEntity. Basically all the code has been moved there, and a new abstract method,setTargetOnFireFor(LivingEntity, int), has been added to let each trident set targets on fire differently.setTargetOnFireForinHellforkEntityto simply calltarget.setOnFireFor(seconds).setTargetOnFireForinSoulforkEntityto useSoulFiredclass if Soul Fire'd is loaded at runtime, otherwise do the same asHellforkEntity.impaled.PlayerEntityMixinto apply the "Vanilla workaround" of setting entities on fire before damaging them so that, if they happen to die in oneshot, their drops are cooked/smelted.onEntityHitinFireTridentEntityto apply the same workaround described in the previous point. After this, it still calls the super method.