private static IEnumerable <Tuple <Location, float> > AdvancedNeighbours(Location root, PathfinderContext context) { yield return(Tuple.Create(context.CreatePoint(root.X + 1, root.Y, root.Z), context.GetBlockWeight(root.X + 1, root.Y, root.Z) + context.GetBlockWeight(root.X + 1, root.Y + 1, root.Z))); yield return(Tuple.Create(context.CreatePoint(root.X - 1, root.Y, root.Z), context.GetBlockWeight(root.X - 1, root.Y, root.Z) + context.GetBlockWeight(root.X - 1, root.Y + 1, root.Z))); yield return(Tuple.Create(context.CreatePoint(root.X, root.Y, root.Z + 1), context.GetBlockWeight(root.X, root.Y, root.Z + 1) + context.GetBlockWeight(root.X, root.Y + 1, root.Z + 1))); yield return(Tuple.Create(context.CreatePoint(root.X, root.Y, root.Z - 1), context.GetBlockWeight(root.X, root.Y, root.Z - 1) + context.GetBlockWeight(root.X, root.Y + 1, root.Z - 1))); yield return(Tuple.Create(context.CreatePoint(root.X, root.Y + 1, root.Z), context.GetBlockWeight(root.X, root.Y + 2, root.Z))); if (root.Y > 0) { yield return(Tuple.Create(context.CreatePoint(root.X, root.Y - 1, root.Z), context.GetBlockWeight(root.X, root.Y - 1, root.Z))); } }