world: place ruined portal pieces into the region replay
PlaceRuinedPortalPiece runs the template through the decoded processor stack — positional Legacy streams per cell drive the gold-to-air, lava-to-magma, netherrack-to-magma and block-age mossiness rolls, the features-cannot-replace guard skips protected cells, and template lava stays when it lands in existing lava. Drip columns below the portal draw from a documented approximation of the shared decoration stream; spreadNetherrack is not needed for the underground setups. The placement chain is now proven end to end: chunk (1,0) reproduces vanilla's saved start (portal_6, CLOCKWISE_90, NONE, air pocket at (16,12,0)) and the fixture parity ticks up to 98.033% with biomes and heightmaps still exact. generatorVersion bumps to 23.
This commit is contained in:
parent
0bb480279f
commit
120531c13d
10 changed files with 366 additions and 14 deletions
|
|
@ -1,6 +1,10 @@
|
|||
package world
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"regionio/internal/worldgen"
|
||||
)
|
||||
|
||||
func TestScheduledRegionOresAreDeterministic(t *testing.T) {
|
||||
makeRegion := func() *decorationRegion {
|
||||
|
|
@ -84,10 +88,14 @@ func TestScheduledRegionOreReplayIsDeterministic(t *testing.T) {
|
|||
}
|
||||
|
||||
a, b := makeRegion(), makeRegion()
|
||||
if err := a.replayScheduledOres(12345, 0, 0); err != nil {
|
||||
od, err := worldgen.LoadOverworldFinalDensity(12345)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := b.replayScheduledOres(12345, 0, 0); err != nil {
|
||||
if err := a.replayScheduledOres(od, 12345, 0, 0); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := b.replayScheduledOres(od, 12345, 0, 0); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for cx := int32(-2); cx <= 2; cx++ {
|
||||
|
|
@ -106,3 +114,5 @@ func TestScheduledRegionOreReplayIsDeterministic(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue