3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-24 18:10:08 +01:00

Added the polyhedral selector to //sel.

Dieser Commit ist enthalten in:
TomyLobo 2013-07-31 10:36:47 +02:00 committet von wizjany
Ursprung 731c8a0ce7
Commit 37373976f5

Datei anzeigen

@ -44,6 +44,7 @@ import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.blocks.BlockType;
import com.sk89q.worldedit.data.ChunkStore;
import com.sk89q.worldedit.regions.ConvexPolyhedralRegionSelector;
import com.sk89q.worldedit.regions.CuboidRegionSelector;
import com.sk89q.worldedit.regions.CylinderRegionSelector;
import com.sk89q.worldedit.regions.EllipsoidRegionSelector;
@ -766,8 +767,12 @@ public class SelectionCommands {
} else if (typeName.equalsIgnoreCase("cyl")) {
selector = new CylinderRegionSelector(oldSelector);
player.print("Cylindrical selector: Left click=center, right click to extend.");
} else if (typeName.equalsIgnoreCase("convex") || typeName.equalsIgnoreCase("hull") || typeName.equalsIgnoreCase("polyhedron")) {
int maxVertices = we.getMaximumPolygonalPoints(player); // TODO: separate maximum for polyhedra
selector = new ConvexPolyhedralRegionSelector(oldSelector, maxVertices);
player.print("Convex polyhedral selector: Left click=First vertex, right click to add more.");
} else {
player.printError("Only cuboid|extend|poly|ellipsoid|sphere|cyl are accepted.");
player.printError("Only cuboid|extend|poly|ellipsoid|sphere|cyl|convex are accepted.");
return;
}