mojira.dev
MCPE-240790

Level seed based fraction query does not exists in features

Summary

The Molang query query.get_level_seed_based_fraction, cannot be resolved when used inside a minecraft:feature_rules and minecraft:feature definitions. The engine reports the query as non-existent / unsupported in this context, even though feature placement is a primary intended use case for this query.

Environment

  • Minecraft stable distribution 1.26.30

  • No experimental toggles enabled

Steps to reproduce

  1. Create a feature rule using mypack:test_feature_rule with a distribution block where x/z use fixed_grid and y is set to a Molang expression that references q.get_level_seed_based_fraction (see attached test_feature_rule.json):

   "y": "q.noise(v.worldx + q.get_level_seed_based_fraction, v.worldz + q.get_level_seed_based_fraction)"
  1. Place the associated feature (mypack:test_feature) via the configured placement_pass/biome filter, or otherwise trigger world generation in an overworld biome so the feature rule attempts to evaluate.

  2. Observe the console/log output.

Current result

The query fails to resolve, producing both of the following errors:

Failed to resolve query query.get_level_seed_based_fraction. Either the query does not exist or it is not supported in this context.
unrecognized token: query.get_level_seed_based_fraction

The feature rule's y distribution expression cannot be evaluated, so the feature either fails to place correctly or the rule errors out entirely.

Expected result

q.get_level_seed_based_fraction should resolve successfully within the Molang context of a feature rule's distribution fields, returning a deterministic seed-based fractional value that can be combined with q.noise (or other functions) to drive placement.

Justification

This query is expected to be usable specifically to make procedural feature placement deterministic and seed-dependent (e.g. combining it with q.noise for per-world variation). If it cannot be resolved inside minecraft:feature_rules, it has no usable context in stable, which blocks intended add-on use cases such as seed-consistent structure/decoration scatter. This looks like either a missing context binding for feature rules or a documentation/availability mismatch.

Linked issues

Attachments

Comments 2

Thank you for helping us improve Minecraft! We saved your files:

[media]

PLEASE fix this 🙏 - there are so many use cases that need this for noise, that addon devs have been trying to figure out for YEARS. We can't do true randomisation of continuous worldgen noise functions in features without this - it means every world has the same q.noise() landscape which is a SERIOUS drawback.

This is because features cannot independently maintain the same randomised numbers from chunk to chunk (apart from unreliable temp-leaking), which means q.noise() must always have the same hardcoded offsets/frequencies/magnitudes for each world to world.

Obviously to avoid race conditions, feature rules need to be able to be run independently in parallel as this is what makes them so performant even on phone processors, but this global seed-dependent constant would not violate this and be extremely useful. (That - or make q.noise() output seed-dependent.) Thankyou! ✨(Also, feature rules for new dimensions? Much faster than scripting worldgen.)

Bogumił Sokołowski-Duda

(Unassigned)

Unconfirmed

Multiple

26.32

Retrieved