Skip to content

Commit 8944d58

Browse files
committed
use neighborface
1 parent f277982 commit 8944d58

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

server/block/portal.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ func (p Portal) EncodeBlock() (string, map[string]any) {
4747

4848
// NeighbourUpdateTick ...
4949
func (p Portal) NeighbourUpdateTick(pos, neighbour cube.Pos, tx *world.Tx) {
50-
axis := pos.Face(neighbour).Axis()
50+
face, ok := pos.NeighbourFace(neighbour)
51+
if !ok {
52+
return
53+
}
54+
axis := face.Axis()
5155
if axis != cube.Y && axis != p.Axis {
5256
return
5357
}

0 commit comments

Comments
 (0)