Skip to content

Add EntityLandEvent - #14204

Open
Clexus wants to merge 4 commits into
PaperMC:mainfrom
Clexus:land
Open

Add EntityLandEvent#14204
Clexus wants to merge 4 commits into
PaperMC:mainfrom
Clexus:land

Conversation

@Clexus

@Clexus Clexus commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This event is called when an entity lands on the block no matter the falling distance, useful for landing detection
image

@Clexus
Clexus requested a review from a team as a code owner August 21, 2026 14:49
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Aug 21, 2026
@electronicboy

Copy link
Copy Markdown
Member

I would generally rather we modify the method signature (i.e. move the current onFall to a new method with the new param and leave the older signature to call the new method) with a callEvent boolean rather than hardcoding this sort of thing, more verbose but not fond of having a hardcoded list of avoidance states as that just tends to be missed

@Clexus

Clexus commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

I would generally rather we modify the method signature (i.e. move the current onFall to a new method with the new param and leave the older signature to call the new method) with a callEvent boolean rather than hardcoding this sort of thing, more verbose but not fond of having a hardcoded list of avoidance states as that just tends to be missed

should be better now

@@ -488,8 +_,18 @@
}

public void fallOn(final Level level, final BlockState state, final BlockPos pos, final Entity entity, final double fallDistance) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe this should be marked as final, that way all callers need to use the explict overriden method, the new method can probably be protected, see what others say here I guess

@github-project-automation github-project-automation Bot moved this from Awaiting review to Changes required in Paper PR Queue Aug 27, 2026
@electronicboy

Copy link
Copy Markdown
Member

In actuality, this method looks like it's only called from a single place, is there any reason for this to need the modifications inside of events, etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Changes required

Development

Successfully merging this pull request may close these issues.

3 participants