Modifier and Type | Method and Description |
---|---|
boolean |
contains(net.minecraft.util.math.Vec3d point)
Returns true if the point is enclosed by this zone, such that none of the coordinates lie outside the range
specified by this zone.
|
double |
distanceTo(net.minecraft.util.math.BlockPos index)
Returns the smallest possible distance that the pos would have to be changed by in order for
IZone.contains(Vec3d) to return true. |
double |
distanceToSquared(net.minecraft.util.math.BlockPos index)
Returns
IZone.distanceTo(BlockPos) but squared. |
boolean |
get(int x,
int z) |
java.util.List<javax.vecmath.Point2i> |
getAll() |
java.util.HashMap<net.minecraft.util.math.ChunkPos,ZoneChunk> |
getChunkMapping() |
java.util.Set<net.minecraft.util.math.ChunkPos> |
getChunkPoses() |
net.minecraft.util.math.BlockPos |
getRandomBlockPos(java.util.Random rand)
Gets a random position that
IZone.contains(Vec3d) will return true. |
ZonePlan |
getWithOffset(int offsetX,
int offsetY) |
boolean |
hasChunk(net.minecraft.util.math.ChunkPos chunkPos) |
ZonePlan |
readFromByteBuf(net.minecraft.network.PacketBuffer buf) |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt) |
void |
set(int x,
int z,
boolean val) |
void |
writeToByteBuf(net.minecraft.network.PacketBuffer buf) |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt) |
public ZonePlan()
public ZonePlan(ZonePlan old)
public boolean get(int x, int z)
public void set(int x, int z, boolean val)
public java.util.List<javax.vecmath.Point2i> getAll()
public ZonePlan getWithOffset(int offsetX, int offsetY)
public boolean hasChunk(net.minecraft.util.math.ChunkPos chunkPos)
public java.util.Set<net.minecraft.util.math.ChunkPos> getChunkPoses()
public java.util.HashMap<net.minecraft.util.math.ChunkPos,ZoneChunk> getChunkMapping()
public void writeToNBT(net.minecraft.nbt.NBTTagCompound nbt)
public void readFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
public double distanceTo(net.minecraft.util.math.BlockPos index)
IZone
IZone.contains(Vec3d)
to return true. If the position is already inside then this will return 0distanceTo
in interface IZone
public double distanceToSquared(net.minecraft.util.math.BlockPos index)
IZone
IZone.distanceTo(BlockPos)
but squared. Usually this will be quicker to calculate.distanceToSquared
in interface IZone
public boolean contains(net.minecraft.util.math.Vec3d point)
IZone
public net.minecraft.util.math.BlockPos getRandomBlockPos(java.util.Random rand)
IZone
IZone.contains(Vec3d)
will return true.getRandomBlockPos
in interface IZone
public ZonePlan readFromByteBuf(net.minecraft.network.PacketBuffer buf)
public void writeToByteBuf(net.minecraft.network.PacketBuffer buf)