Skip to content

Generate Soul Glass Predicate#1268

Draft
BPR02 wants to merge 2 commits intoGamemode4Dev:update-26.1from
BPR02:soul-glass-generate
Draft

Generate Soul Glass Predicate#1268
BPR02 wants to merge 2 commits intoGamemode4Dev:update-26.1from
BPR02:soul-glass-generate

Conversation

@BPR02
Copy link
Member

@BPR02 BPR02 commented Feb 22, 2026

This PR uses bolt to generate the soul glass beam check instead of having it pregenerated. It also makes it check the full height range of -63-319 for the 1.17+ overworld.

Note this PR also hardcodes the height range check for each dimension, so custom dimensions aren't supported (but can have added support via a function tag) and changes to the vanilla dimension height ranges may cause soul beacons to function improperly.

Copy link
Contributor

@runcows runcows left a comment

Choose a reason for hiding this comment

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

I don't like how this PR essentially drops support of custom dimensions without explicit support with a predicate which is cumbersome to create without bolt. I especially worry about the number of help requests we get as a result of this 😓

My gut tells me there HAS to be a better way of checking if a beacon is active or not, other than checking every block above the beacon, but my mind is coming up short. Would it cause errors for the predicate to check block spaces outside of the build range?

Comment on lines +10 to +19
{
"condition": "minecraft:location_check",
"predicate": {
"position": {
"y": {
"min": y
}
}
}
},
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this location check is doing in the predicate?
I don't fully understand its purpose here or in the current nightmare-fuel predicate, but in this current implementation, this check succeeding would be enough for it to not check the remaining conditions, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait ok, i understand this location check now, its to exclude blocks under the beacon. This should be true AND the following block checks. The current version is OR and will succeed regardless of the block checks.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you mean current version as in the one that's in master right now, that was made before all_of (AND) was added, and thus needed to use DeMorgan's to derive an all_of (AND) using inverted (OR) and any_of (OR). The current version does the same thing as this one.

Copy link
Contributor

@runcows runcows Feb 28, 2026

Choose a reason for hiding this comment

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

No in that message, current was referring to this PR. For each block in the predicate in this PR, the condition is any_of and so the min block position check will cause each block position to succeed if above the execution position.

Edit: I did not understand the predicate fully, it is complicated

@BPR02
Copy link
Member Author

BPR02 commented Feb 28, 2026

I don't like how this PR essentially drops support of custom dimensions without explicit support with a predicate which is cumbersome to create without bolt. I especially worry about the number of help requests we get as a result of this 😓

My gut tells me there HAS to be a better way of checking if a beacon is active or not, other than checking every block above the beacon, but my mind is coming up short. Would it cause errors for the predicate to check block spaces outside of the build range?

Yes, the predicate will fail if a block check occurs outside of the dimension bounds. We could, at runtime, determine the min and max altitudes of a dimension, then macro a predicate into existence if we want to support custom dimensions (or modified vanilla dimensions).

@runcows
Copy link
Contributor

runcows commented Feb 28, 2026

Misode has informed me of wizardry. If you use a predicate to check the light level in a location check is 0-15, that predicate will only fail if the location is out of the dimension bounds.

In theory we could have just one predicate that covers the max world size possible, but we should benchmark that, since checking 4064 blocks might be a bit much.

@misode misode changed the base branch from master to update-26.1 February 28, 2026 14:38
@Bloo-dev Bloo-dev added quality-update Improves efficiency or structure without affecting functionality of a module fix This fixes something that was wrong and removed quality-update Improves efficiency or structure without affecting functionality of a module labels Feb 28, 2026
@BPR02
Copy link
Member Author

BPR02 commented Feb 28, 2026

Misode has informed me of wizardry. If you use a predicate to check the light level in a location check is 0-15, that predicate will only fail if the location is out of the dimension bounds.

True, we could check "is this block in bounds, plus the other original checks."

@misode misode marked this pull request as draft March 10, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix This fixes something that was wrong

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants