Skip to content

Make beacons not apply effects when covered or base destroyed while using "allow-effects-with-tinted-glass"#1746

Merged
granny merged 3 commits into
PurpurMC:ver/1.21.11from
iamgabrieltv:fix-1741
Jan 4, 2026
Merged

Make beacons not apply effects when covered or base destroyed while using "allow-effects-with-tinted-glass"#1746
granny merged 3 commits into
PurpurMC:ver/1.21.11from
iamgabrieltv:fix-1741

Conversation

@iamgabrieltv

Copy link
Copy Markdown
Contributor

Resolves #1741 which reported unexpected beacon behavior while using tinted glass and "allow-effects-with-tinted-glass".

The problem with the base not updating was that with tinted glass being an opaque block it would still cause blockEntity.beamSections to be empty causing the below code to not check if the base of the beacon has changed.

if (!blockEntity.beamSections.isEmpty()) { 
    blockEntity.levels = updateBase(level, x, y, z);
}

The problem with the opaque block check failing above tinted glass was that isTintedGlass served as an override to the condition before applying the effects. To fix it I just set isTintedGlass to false if the block is opaque and not tinted glass.

@granny granny left a comment

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.

LGTM! Thanks for the PR :)

@granny granny merged commit 605b2bf into PurpurMC:ver/1.21.11 Jan 4, 2026
@iamgabrieltv iamgabrieltv deleted the fix-1741 branch January 12, 2026 20:33
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.

"allow-effects-with-tinted-glass: true" effective even with solid blocks above and when beacon base blocks removed

2 participants