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

player/player.go: added handler for fire extinguish #901

Merged

Conversation

aabstractt
Copy link
Contributor

No description provided.

Copy link
Contributor

@didntpot didntpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems incorrect

CJMustard1452

This comment was marked as resolved.

@aabstractt
Copy link
Contributor Author

It seems to actually work as expected.

2024-07-18.17-04-36.mp4

@@ -55,6 +55,9 @@ type Handler interface {
// HandleSkinChange handles the player changing their skin. ctx.Cancel() may be called to cancel the skin
// change.
HandleSkinChange(ctx *event.Context, skin *skin.Skin)
// HandleFireExtinguish handles the player extinguishing a fire at a specific position. ctx.Cancel() may
// be called to cancel the fire being extinguished.
HandleFireExtinguish(ctx *event.Context, pos cube.Pos)
// HandleStartBreak handles the player starting to break a block at the position passed. ctx.Cancel() may
// be called to stop the player from breaking the block completely.
HandleStartBreak(ctx *event.Context, pos cube.Pos)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it as necessary when wanting to cancel the fire extinguishment only in some positions, you cannot use the player's position, since both positions are different than expected.

@TwistedAsylumMC TwistedAsylumMC merged commit 9c86481 into df-mc:master Aug 11, 2024
1 check passed
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.

4 participants