mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-17 02:34:04 +00:00
Continue the great purge
This commit is contained in:
@@ -55,11 +55,6 @@ public abstract class AbstractRegion implements Region {
|
||||
return world;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWorld(LocalWorld world) {
|
||||
setWorld((World) world);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWorld(World world) {
|
||||
this.world = world;
|
||||
@@ -89,7 +84,7 @@ public abstract class AbstractRegion implements Region {
|
||||
final BlockVector min = getMinimumPoint().toBlockVector();
|
||||
final BlockVector max = getMaximumPoint().toBlockVector();
|
||||
|
||||
final List<BlockVector2D> points = new ArrayList<BlockVector2D>(4);
|
||||
final List<BlockVector2D> points = new ArrayList<>(4);
|
||||
|
||||
points.add(new BlockVector2D(min.getX(), min.getZ()));
|
||||
points.add(new BlockVector2D(min.getX(), max.getZ()));
|
||||
@@ -160,7 +155,7 @@ public abstract class AbstractRegion implements Region {
|
||||
*/
|
||||
@Override
|
||||
public Set<Vector2D> getChunks() {
|
||||
final Set<Vector2D> chunks = new HashSet<Vector2D>();
|
||||
final Set<Vector2D> chunks = new HashSet<>();
|
||||
|
||||
final Vector min = getMinimumPoint();
|
||||
final Vector max = getMaximumPoint();
|
||||
@@ -185,7 +180,7 @@ public abstract class AbstractRegion implements Region {
|
||||
|
||||
@Override
|
||||
public Set<Vector> getChunkCubes() {
|
||||
final Set<Vector> chunks = new HashSet<Vector>();
|
||||
final Set<Vector> chunks = new HashSet<>();
|
||||
|
||||
final Vector min = getMinimumPoint();
|
||||
final Vector max = getMaximumPoint();
|
||||
|
@@ -19,13 +19,13 @@
|
||||
|
||||
package com.sk89q.worldedit.regions;
|
||||
|
||||
import com.sk89q.worldedit.LocalWorld;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.regions.polyhedron.Edge;
|
||||
import com.sk89q.worldedit.regions.polyhedron.Triangle;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
@@ -33,24 +33,24 @@ import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ConvexPolyhedralRegion extends AbstractRegion {
|
||||
|
||||
/**
|
||||
* Vertices that are contained in the convex hull.
|
||||
*/
|
||||
private final Set<Vector> vertices = new LinkedHashSet<Vector>();
|
||||
private final Set<Vector> vertices = new LinkedHashSet<>();
|
||||
|
||||
/**
|
||||
* Triangles that form the convex hull.
|
||||
*/
|
||||
private final List<Triangle> triangles = new ArrayList<Triangle>();
|
||||
private final List<Triangle> triangles = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Vertices that are coplanar to the first 3 vertices.
|
||||
*/
|
||||
private final Set<Vector> vertexBacklog = new LinkedHashSet<Vector>();
|
||||
private final Set<Vector> vertexBacklog = new LinkedHashSet<>();
|
||||
|
||||
/**
|
||||
* Minimum point of the axis-aligned bounding box.
|
||||
@@ -81,14 +81,6 @@ public class ConvexPolyhedralRegion extends AbstractRegion {
|
||||
super(world);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated cast {@code world} to {@link World}
|
||||
*/
|
||||
@Deprecated
|
||||
public ConvexPolyhedralRegion(LocalWorld world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an independent copy of the given region.
|
||||
*
|
||||
@@ -174,7 +166,7 @@ public class ConvexPolyhedralRegion extends AbstractRegion {
|
||||
}
|
||||
|
||||
// Look for triangles that face the vertex and remove them
|
||||
final Set<Edge> borderEdges = new LinkedHashSet<Edge>();
|
||||
final Set<Edge> borderEdges = new LinkedHashSet<>();
|
||||
for (Iterator<Triangle> it = triangles.iterator(); it.hasNext(); ) {
|
||||
final Triangle triangle = it.next();
|
||||
|
||||
@@ -207,7 +199,7 @@ public class ConvexPolyhedralRegion extends AbstractRegion {
|
||||
vertices.remove(vertex);
|
||||
|
||||
// Clone, clear and work through the backlog
|
||||
final List<Vector> vertexBacklog2 = new ArrayList<Vector>(vertexBacklog);
|
||||
final List<Vector> vertexBacklog2 = new ArrayList<>(vertexBacklog);
|
||||
vertexBacklog.clear();
|
||||
for (Vector vertex2 : vertexBacklog2) {
|
||||
addVertex(vertex2);
|
||||
@@ -269,7 +261,7 @@ public class ConvexPolyhedralRegion extends AbstractRegion {
|
||||
}
|
||||
|
||||
private static void shiftCollection(Collection<Vector> collection, Vector change) {
|
||||
final List<Vector> tmp = new ArrayList<Vector>(collection);
|
||||
final List<Vector> tmp = new ArrayList<>(collection);
|
||||
collection.clear();
|
||||
for (Vector vertex : tmp) {
|
||||
collection.add(change.add(vertex));
|
||||
@@ -323,7 +315,7 @@ public class ConvexPolyhedralRegion extends AbstractRegion {
|
||||
return vertices;
|
||||
}
|
||||
|
||||
final List<Vector> ret = new ArrayList<Vector>(vertices);
|
||||
final List<Vector> ret = new ArrayList<>(vertices);
|
||||
ret.addAll(vertexBacklog);
|
||||
|
||||
return ret;
|
||||
|
@@ -19,9 +19,10 @@
|
||||
|
||||
package com.sk89q.worldedit.regions;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.sk89q.worldedit.BlockVector;
|
||||
import com.sk89q.worldedit.BlockVector2D;
|
||||
import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.Vector2D;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
@@ -33,8 +34,6 @@ import com.sk89q.worldedit.world.World;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
/**
|
||||
* Represents a cylindrical region.
|
||||
*/
|
||||
@@ -53,13 +52,6 @@ public class CylinderRegion extends AbstractRegion implements FlatRegion {
|
||||
this((World) null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated cast {@code world} to {@link World}
|
||||
*/
|
||||
@Deprecated
|
||||
public CylinderRegion(LocalWorld world) {
|
||||
this((World) world);
|
||||
}
|
||||
/**
|
||||
* Construct the region.
|
||||
*
|
||||
@@ -70,11 +62,6 @@ public class CylinderRegion extends AbstractRegion implements FlatRegion {
|
||||
hasY = false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public CylinderRegion(LocalWorld world, Vector center, Vector2D radius, int minY, int maxY) {
|
||||
this((World) world, center, radius, minY, maxY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the region.
|
||||
*
|
||||
|
@@ -21,13 +21,13 @@ package com.sk89q.worldedit.regions;
|
||||
|
||||
import com.sk89q.worldedit.BlockVector;
|
||||
import com.sk89q.worldedit.BlockVector2D;
|
||||
import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.Vector2D;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.storage.ChunkStore;
|
||||
import java.util.Set;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Represents an ellipsoid region.
|
||||
@@ -54,11 +54,6 @@ public class EllipsoidRegion extends AbstractRegion {
|
||||
this(null, pos1, pos2);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public EllipsoidRegion(LocalWorld world, Vector center, Vector radius) {
|
||||
this((World) world, center, radius);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new instance of this ellipsoid region.
|
||||
*
|
||||
|
@@ -107,11 +107,6 @@ public class NullRegion implements Region {
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWorld(LocalWorld world) {
|
||||
setWorld((World) world);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NullRegion clone() {
|
||||
return new NullRegion();
|
||||
|
@@ -21,7 +21,6 @@ package com.sk89q.worldedit.regions;
|
||||
|
||||
import com.sk89q.worldedit.BlockVector;
|
||||
import com.sk89q.worldedit.BlockVector2D;
|
||||
import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.Vector2D;
|
||||
import com.sk89q.worldedit.regions.iterator.FlatRegion3DIterator;
|
||||
@@ -52,11 +51,6 @@ public class Polygonal2DRegion extends AbstractRegion implements FlatRegion {
|
||||
this((World) null);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Polygonal2DRegion(LocalWorld world) {
|
||||
this((World) world);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the region.
|
||||
*
|
||||
@@ -67,11 +61,6 @@ public class Polygonal2DRegion extends AbstractRegion implements FlatRegion {
|
||||
hasY = false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Polygonal2DRegion(LocalWorld world, List<BlockVector2D> points, int minY, int maxY) {
|
||||
this((World) world, points, minY, maxY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the region.
|
||||
*
|
||||
|
@@ -21,7 +21,6 @@ package com.sk89q.worldedit.regions;
|
||||
|
||||
import com.sk89q.worldedit.BlockVector;
|
||||
import com.sk89q.worldedit.BlockVector2D;
|
||||
import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.Vector2D;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
@@ -147,14 +146,6 @@ public interface Region extends Iterable<BlockVector>, Cloneable {
|
||||
*/
|
||||
public void setWorld(@Nullable World world);
|
||||
|
||||
/**
|
||||
* Sets the world that the selection is in.
|
||||
*
|
||||
* @param world the world, which may be null
|
||||
*/
|
||||
@Deprecated
|
||||
public void setWorld(@Nullable LocalWorld world);
|
||||
|
||||
/**
|
||||
* Make a clone of the region.
|
||||
*
|
||||
|
@@ -19,19 +19,19 @@
|
||||
|
||||
package com.sk89q.worldedit.regions;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.google.common.collect.Iterators;
|
||||
import com.sk89q.worldedit.BlockVector;
|
||||
import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
/**
|
||||
* An intersection of several other regions. Any location that is contained in one
|
||||
* of the child regions is considered as contained by this region.
|
||||
@@ -69,7 +69,7 @@ public class RegionIntersection extends AbstractRegion {
|
||||
* @param world the world
|
||||
* @param regions a list of regions, which is copied
|
||||
*/
|
||||
public RegionIntersection(LocalWorld world, List<Region> regions) {
|
||||
public RegionIntersection(World world, List<Region> regions) {
|
||||
super(world);
|
||||
checkNotNull(regions);
|
||||
checkArgument(!regions.isEmpty(), "empty region list is not supported");
|
||||
@@ -82,7 +82,7 @@ public class RegionIntersection extends AbstractRegion {
|
||||
* @param world the world
|
||||
* @param regions an array of regions, which is copied
|
||||
*/
|
||||
public RegionIntersection(LocalWorld world, Region... regions) {
|
||||
public RegionIntersection(World world, Region... regions) {
|
||||
super(world);
|
||||
checkNotNull(regions);
|
||||
checkArgument(regions.length > 0, "empty region list is not supported");
|
||||
|
@@ -93,14 +93,6 @@ public class Polygonal2DRegionSelector implements RegionSelector, CUIRegion {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated cast {@code world} to {@link World}
|
||||
*/
|
||||
@Deprecated
|
||||
public Polygonal2DRegionSelector(@Nullable LocalWorld world, List<BlockVector2D> points, int minY, int maxY) {
|
||||
this((World) world, points, minY, maxY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new selector.
|
||||
*
|
||||
|
Reference in New Issue
Block a user