The bug
Structures can provide multiple palette variants, however their selection looks faulty:
(MCP: net.minecraft.world.gen.feature.template.PlacementSettings.func_204764_a(List<List<BlockInfo>>, BlockPos))
18w49a, ccf.java
public List<cci.b> a(List<List<cci.b>> list, @Nullable et et2) {
this.j = 8;
if (this.j != null && this.j >= 0 && this.j < list.size()) {
return list.get(this.j);
}
this.j = this.b(et2).nextInt(list.size());
return list.get(this.j);
}There are two checks (non-null and >= 0) which will always succeed. And for structures with more than 8 palette variants (currently not the case for vanilla structures) always the 9th palette variant is loaded.
How to reproduce
Seems like variant selection is position dependent, therefore the following steps load the structure at multiple positions.
Structures have to be placed inside the generated/minecraft/structures directory of a world.
Load the structure
at multiple positions
/fill ~1 ~1 ~1 ~10 ~1 ~10 structure_block[mode=load]{mode:"LOAD",posX:0,posY:1,posZ:0,sizeX:1,sizeY:1,sizeZ:1,name:"8-variants"}/fill ~1 ~ ~1 ~10 ~ ~10 redstone_block→ ✔ Different wool types are placed
Load the structure
at multiple positions
/fill ~1 ~1 ~1 ~10 ~1 ~10 structure_block[mode=load]{mode:"LOAD",posX:0,posY:1,posZ:0,sizeX:1,sizeY:1,sizeZ:1,name:"9-variants"}/fill ~1 ~ ~1 ~10 ~ ~10 redstone_block→ ❌ It always places the 9th variant, light gray wool
How to verify code-wise
Decompile Minecraft or use a viewer such as Bytecode Viewer
Search for the string
fossil/spine_1In the source look for the first line of code containing
16 -Open the type of the local variable two lines above
Search for a method containing
= 8;
Can confirm code-wise that this has been fixed in 1.15-pre2