Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
}
Expand Down