public final class MapPolygon
extends java.lang.Object
Note that the actual list passed into the constructor isn't retained; the points are copied into an unmodifiable list. If you need to update the points, pass in a new list entirely.
Setters use the Builder pattern so they can be chained.
| Constructor and Description |
|---|
MapPolygon(net.minecraft.core.BlockPos... points)
Constructor.
|
MapPolygon(java.util.List<net.minecraft.core.BlockPos> points)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<net.minecraft.core.BlockPos> |
getPoints()
Gets an unmodifiable list of the points.
|
java.util.Iterator<net.minecraft.core.BlockPos> |
iterator()
Iterates the points.
|
MapPolygon |
setPoints(java.util.List<net.minecraft.core.BlockPos> points) |
java.lang.String |
toString() |
public MapPolygon(net.minecraft.core.BlockPos... points)
points - See class description for details on ordering.java.lang.IllegalArgumentException - if conditions for a proper polygon aren't met.public MapPolygon(java.util.List<net.minecraft.core.BlockPos> points)
points - See class description for details on ordering.java.lang.IllegalArgumentException - if conditions for a proper polygon aren't met.public java.util.List<net.minecraft.core.BlockPos> getPoints()
public MapPolygon setPoints(java.util.List<net.minecraft.core.BlockPos> points)
public java.util.Iterator<net.minecraft.core.BlockPos> iterator()
public java.lang.String toString()
toString in class java.lang.Object