This commit is contained in:
Jesse Boyd
2019-06-29 03:10:47 +10:00
parent 8c44c532c4
commit a2efdbc488
18 changed files with 125 additions and 95 deletions

View File

@ -156,4 +156,12 @@ public interface RegionSelector {
*/
List<String> getInformationLines();
/**
* Get the verticies
* @return
* @throws IncompleteRegionException
*/
default List<BlockVector3> getVerticies() throws IncompleteRegionException {
return Collections.singletonList(getPrimaryPosition());
}
}

View File

@ -276,4 +276,8 @@ public class ConvexPolyhedralRegionSelector implements RegionSelector, CUIRegion
}
}
@Override
public List<BlockVector3> getVerticies() {
return new ArrayList<>(region.getVertices());
}
}

View File

@ -40,6 +40,7 @@ import com.sk89q.worldedit.world.World;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@ -308,4 +309,9 @@ public class CuboidRegionSelector implements RegionSelector, CUIRegion {
return "cuboid";
}
@Override
public List<BlockVector3> getVerticies() {
return Arrays.asList(position1, position2);
}
}