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

[Feature Request]: Incapacitated integration #4

Open
TwoHeadedGiant opened this issue Jun 12, 2023 · 2 comments
Open

[Feature Request]: Incapacitated integration #4

TwoHeadedGiant opened this issue Jun 12, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@TwoHeadedGiant
Copy link

TwoHeadedGiant commented Jun 12, 2023

Is your feature request related to a problem?

No

Solution(s)

To add another incentive to use parties, when incapacitated is also installed, incapacitated players could only be revived by someone in their party, this could be toggleable in a config

Describe alternatives you've considered

Alternatively, reviving players in your party could give temporary positive potion effects to the revived player, and potentially disregard the limit for the number of times a player can be revived before permanently dying, while leaving out of party reviving as is

Mod Version

0.0.0

Mod Loader Version

Doesnt apply

Mod Loader

N/A

Additional context

No response

@TwoHeadedGiant TwoHeadedGiant added the enhancement New feature or request label Jun 12, 2023
@CartoonishVillain
Copy link

Hey there! Incapacitated doesn't have great support for such behavior at this moment, but I'll add support in the next update!

@CartoonishVillain
Copy link

CartoonishVillain commented Nov 3, 2024

As of Incapacitated 1.9, released for Neoforge and fabric 1.21.1, and fabric 1.20.1, it is now possible to integrate support in for this.

For fabric support, you'll want to include a listener for IncapacitatedRevivalCallback, giving you instances of the downed player and the player who may or may not be reviving.

If the reviving player can't revive the downed player, you'll want to return RevivePlayerState.INCAPABLE_OF_REVIVING,

otherwise, if they are able to revive the player, you'll want to return RevivePlayerState.CAPABLE_OF_REVIVING.

For neoforge, you'll want to subscribe to ReviveCheckEvent on the event bus. You'll have access to the same parameters as the fabric listener, but in this case, you'll want to cancel the event if the check fails, and not do anything to effect the outcome if the check succeeds. (Unless you're trying to do extra custom logic of course)

I unfortunately do not have the time or energy to support older version/mod loader combos, but support will be maintained for these event hooks into future versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants