world: replay datapack features across regions

This commit is contained in:
Daniar Mannanov 2026-08-25 03:59:10 +03:00
parent f1d1d109f4
commit d8b5d0f79b
13 changed files with 1259 additions and 8 deletions

View file

@ -28,6 +28,9 @@ func (r *decorationRegion) testBlockPredicate(set *worldgen.FeatureSet, raw json
switch predicate.Type {
case "minecraft:true":
return true, nil
case "minecraft:solid":
state := r.getBlock(position.X, position.Y, position.Z)
return state != StateAir && stateFlags(state)&flagBlocksMotion != 0, nil
case "minecraft:inside_world_bounds":
return position.Y >= MinY && position.Y < MinY+WorldHeight, nil
case "minecraft:matching_blocks":