Constructor and Description |
---|
Box() |
Box(net.minecraft.util.math.BlockPos min,
net.minecraft.util.math.BlockPos max) |
Box(net.minecraft.tileentity.TileEntity e) |
Modifier and Type | Method and Description |
---|---|
net.minecraft.util.math.BlockPos |
center() |
net.minecraft.util.math.Vec3d |
centerExact() |
net.minecraft.util.math.BlockPos |
closestInsideTo(net.minecraft.util.math.BlockPos toTest) |
boolean |
contains(net.minecraft.util.math.BlockPos i) |
boolean |
contains(net.minecraft.util.math.Vec3d p)
Returns true if the point is enclosed by this zone, such that none of the coordinates lie outside the range
specified by this zone.
|
IBox |
contract(int amount) |
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 |
doesIntersectWith(Box box) |
boolean |
equals(java.lang.Object obj) |
Box |
expand(int amount) |
Box |
extendToEncompass(net.minecraft.util.math.BlockPos toBeContained) |
Box |
extendToEncompass(IBox toBeContained) |
Box |
extendToEncompass(net.minecraft.util.math.Vec3d toBeContained) |
void |
extendToEncompassBoth(net.minecraft.util.math.BlockPos newMin,
net.minecraft.util.math.BlockPos newMax) |
java.util.List<net.minecraft.util.math.BlockPos> |
getBlocksInArea() |
java.util.List<net.minecraft.util.math.BlockPos> |
getBlocksOnEdge() |
net.minecraft.util.math.AxisAlignedBB |
getBoundingBox()
IMPORTANT: Use
contains(Vec3d) instead of the returned AxisAlignedBB.isVecInside(Vec3d) as the
logic is different! |
Box |
getIntersect(Box box) |
net.minecraft.util.math.BlockPos |
getRandomBlockPos(java.util.Random rand)
Gets a random position that
IZone.contains(Vec3d) will return true. |
int |
hashCode() |
void |
initialize(IAreaProvider a) |
void |
initialize(IBox box) |
void |
initialize(net.minecraft.nbt.NBTTagCompound nbt) |
void |
initializeCenter(net.minecraft.util.math.BlockPos center,
int size) |
void |
initializeCenter(net.minecraft.util.math.BlockPos center,
net.minecraft.util.math.Vec3i size) |
boolean |
isCorner(net.minecraft.util.math.BlockPos pos)
Delegate for
PositionUtil.isCorner(BlockPos, BlockPos, BlockPos) |
boolean |
isInitialized() |
boolean |
isOnEdge(net.minecraft.util.math.BlockPos pos)
Delegate for
PositionUtil.isOnEdge(BlockPos, BlockPos, BlockPos) |
boolean |
isOnFace(net.minecraft.util.math.BlockPos pos)
Delegate for
PositionUtil.isOnFace(BlockPos, BlockPos, BlockPos) |
net.minecraft.util.math.BlockPos |
max() |
net.minecraft.util.math.BlockPos |
min() |
void |
readData(net.minecraft.network.PacketBuffer stream) |
void |
reset() |
void |
setMax(net.minecraft.util.math.BlockPos max) |
void |
setMin(net.minecraft.util.math.BlockPos min) |
net.minecraft.util.math.BlockPos |
size() |
java.lang.String |
toString() |
void |
writeData(net.minecraft.network.PacketBuffer stream) |
net.minecraft.nbt.NBTTagCompound |
writeToNBT() |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt) |
public Box()
public Box(net.minecraft.util.math.BlockPos min, net.minecraft.util.math.BlockPos max)
public Box(net.minecraft.tileentity.TileEntity e)
public void reset()
public boolean isInitialized()
public void extendToEncompassBoth(net.minecraft.util.math.BlockPos newMin, net.minecraft.util.math.BlockPos newMax)
public void setMin(net.minecraft.util.math.BlockPos min)
public void setMax(net.minecraft.util.math.BlockPos max)
public void initialize(IBox box)
public void initialize(IAreaProvider a)
public void initialize(net.minecraft.nbt.NBTTagCompound nbt)
public void writeToNBT(net.minecraft.nbt.NBTTagCompound nbt)
public net.minecraft.nbt.NBTTagCompound writeToNBT()
public void initializeCenter(net.minecraft.util.math.BlockPos center, int size)
public void initializeCenter(net.minecraft.util.math.BlockPos center, net.minecraft.util.math.Vec3i size)
public java.util.List<net.minecraft.util.math.BlockPos> getBlocksInArea()
public java.util.List<net.minecraft.util.math.BlockPos> getBlocksOnEdge()
public boolean contains(net.minecraft.util.math.Vec3d p)
IZone
public boolean contains(net.minecraft.util.math.BlockPos i)
public net.minecraft.util.math.BlockPos center()
public net.minecraft.util.math.Vec3d centerExact()
public java.lang.String toString()
toString
in class java.lang.Object
public net.minecraft.util.math.AxisAlignedBB getBoundingBox()
contains(Vec3d)
instead of the returned AxisAlignedBB.isVecInside(Vec3d)
as the
logic is different!public Box extendToEncompass(net.minecraft.util.math.Vec3d toBeContained)
public Box extendToEncompass(net.minecraft.util.math.BlockPos toBeContained)
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 net.minecraft.util.math.BlockPos closestInsideTo(net.minecraft.util.math.BlockPos toTest)
public net.minecraft.util.math.BlockPos getRandomBlockPos(java.util.Random rand)
IZone
IZone.contains(Vec3d)
will return true.getRandomBlockPos
in interface IZone
public boolean isCorner(net.minecraft.util.math.BlockPos pos)
PositionUtil.isCorner(BlockPos, BlockPos, BlockPos)
public boolean isOnEdge(net.minecraft.util.math.BlockPos pos)
PositionUtil.isOnEdge(BlockPos, BlockPos, BlockPos)
public boolean isOnFace(net.minecraft.util.math.BlockPos pos)
PositionUtil.isOnFace(BlockPos, BlockPos, BlockPos)
public boolean doesIntersectWith(Box box)
@Nullable public Box getIntersect(Box box)
public void readData(net.minecraft.network.PacketBuffer stream)
public void writeData(net.minecraft.network.PacketBuffer stream)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object