Skip to content

Update affects spawning api#13556

Merged
kennytv merged 2 commits intoPaperMC:mainfrom
Lulu13022002:up/affects-spawning
Feb 6, 2026
Merged

Update affects spawning api#13556
kennytv merged 2 commits intoPaperMC:mainfrom
Lulu13022002:up/affects-spawning

Conversation

@Lulu13022002
Copy link
Contributor

Related to #12988
Update this api to cover modern blocks/entities such as endermite/creaking and trialspawners.

@Lulu13022002 Lulu13022002 requested a review from a team as a code owner January 15, 2026 16:38
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Jan 15, 2026
@kennytv kennytv merged commit c59990d into PaperMC:main Feb 6, 2026
4 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting review to Merged in Paper PR Queue Feb 6, 2026
+ if (EntitySelector.PLAYER_AFFECTS_SPAWNING.test(player)) { // combines NO_SPECTATORS and LIVING_ENTITY_STILL_ALIVE with an "affects spawning" check
+ double distanceSqr = player.distanceToSqr(x, y, z);
+ if (range < 0.0D || distanceSqr < range * range) {
+ double playerDist = player.distanceToSqr(x, y, z);
Copy link

Choose a reason for hiding this comment

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

Could use a tab here :)

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

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants