Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.sk89q.worldedit.math.Vector3;
import com.sk89q.worldedit.regions.polyhedron.Edge;
import com.sk89q.worldedit.regions.polyhedron.Triangle;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.world.World;

import java.util.ArrayList;
Expand Down Expand Up @@ -255,14 +256,16 @@ public Vector3 getCenter() {

@Override
public void expand(BlockVector3... changes) throws RegionOperationException {
throw new RegionOperationException(TranslatableComponent.of("worldedit.selection.convex.error.cannot-expand"));
}

@Override
public void contract(BlockVector3... changes) throws RegionOperationException {
throw new RegionOperationException(TranslatableComponent.of("worldedit.selection.convex.error.cannot-contract"));
}

@Override
public void shift(BlockVector3 change) throws RegionOperationException {
public void shift(BlockVector3 change) {
Vector3 vec = change.toVector3();
shiftCollection(vertices, change);
shiftCollection(vertexBacklog, change);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public void contract(BlockVector3... changes) {
}

@Override
public void shift(BlockVector3 change) throws RegionOperationException {
public void shift(BlockVector3 change) {
pos1 = pos1.add(change);
pos2 = pos2.add(change);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public void contract(BlockVector3... changes) throws RegionOperationException {
}

@Override
public void shift(BlockVector3 change) throws RegionOperationException {
public void shift(BlockVector3 change) {
center = center.add(change.toBlockVector2());

int changeY = change.y();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void contract(BlockVector3... changes) throws RegionOperationException {
}

@Override
public void shift(BlockVector3 change) throws RegionOperationException {
public void shift(BlockVector3 change) {
center = center.add(change);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public void contract(BlockVector3... changes) throws RegionOperationException {
}

@Override
public void shift(BlockVector3 change) throws RegionOperationException {
public void shift(BlockVector3 change) {
for (int i = 0; i < points.size(); ++i) {
BlockVector2 point = points.get(i);
points.set(i, BlockVector2.at(point.x() + change.x(), point.z() + change.z()));
Expand Down
2 changes: 2 additions & 0 deletions worldedit-core/src/main/resources/lang/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@
"worldedit.selection.convex.info.triangles": "Triangles: {0}",
"worldedit.selection.convex.explain.primary": "Started new selection with vertex {0}.",
"worldedit.selection.convex.explain.secondary": "Added vertex {0} to the selection.",
"worldedit.selection.convex.error.cannot-expand": "Cannot expand a convex polyhedral region.",
"worldedit.selection.convex.error.cannot-contract": "Cannot contract a convex polyhedral region.",
"worldedit.selection.cuboid.info.pos1": "Position 1: {0}",
"worldedit.selection.cuboid.info.pos2": "Position 2: {0}",
"worldedit.selection.cuboid.explain.primary": "First position set to {0}.",
Expand Down
Loading