mojira.dev
MC-307874

Using the default `frequency_reduction_method` in structure set files results in probabilities being calculated incorrectly

Inside of net/minecraft/world/level/levelgen/structure/placement/StructurePlacement funtion probabilityReducer calls another function setLargeFeatureWithSalt with arguments in incorrect order.

random.setLargeFeatureWithSalt(seed, salt, sourceX, sourceZ); is called, when it actually should be

random.setLargeFeatureWithSalt(seed, sourceX, sourceZ, salt); because function that is called acctepts arguments in next order

setLargeFeatureWithSalt(final long seed, final int x, final int z, final int blend)


Which results in incorrect probability.

Attachments

Comments 2

Turns out, this makes default method is useless for randomisation. I`ve made a datapack that uses 2 structure set, one places red columns with default reduction method, another places blue columns with legacy_type_2. Both sets have the same salt, which should give same result. But default removes lines of structure attempts in Z cardinal direction instead of expected randomisation. It is expected that both columns would spawn at the same position, one over another. Datapack that reproduces it attached below for version 26.2.

[media]
image-20260802-170734.png

Hugger

(Unassigned)

Community Consensus

Platform

Low

Structures

26.2 Snapshot 5, 26.3

Retrieved