diff --git a/structure.go b/structure.go index 87b5b60..8e47ca2 100644 --- a/structure.go +++ b/structure.go @@ -2,11 +2,13 @@ package schematic import ( "fmt" + "maps" "math" "reflect" "github.com/df-mc/dragonfly/server/block" "github.com/df-mc/dragonfly/server/world" + "github.com/df-mc/worldupgrader/blockupgrader" ) // schematic implements the structure of a Schematic, providing methods to read from it. @@ -69,7 +71,13 @@ func (s *schematic) At(x, y, z int, _ func(int, int, int) world.Block) (world.Bl if !ok { return block.Air{}, nil } - ret, ok := world.BlockByName(n.name, n.properties) + + u := blockupgrader.Upgrade(blockupgrader.BlockState{ + Name: n.name, + Properties: maps.Clone(n.properties), + }) + + ret, ok := world.BlockByName(u.Name, u.Properties) if !ok { return block.Air{}, nil }