Package com.jozufozu.flywheel.util.box
Class GridAlignedBB
java.lang.Object
com.jozufozu.flywheel.util.box.GridAlignedBB
- All Implemented Interfaces:
ImmutableBox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassign(ImmutableBox other) assign(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end) voidassign(net.minecraft.world.phys.AABB other) static ImmutableBoxcontainingAll(Collection<net.minecraft.core.BlockPos> positions) booleancontains(ImmutableBox other) copy()booleanempty()booleanvoidvoidstatic GridAlignedBBfrom(int sectionX, int sectionZ) static GridAlignedBBfrom(net.minecraft.core.BlockPos pos) static GridAlignedBBfrom(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end) static GridAlignedBBfrom(net.minecraft.core.SectionPos pos) static GridAlignedBBfrom(net.minecraft.world.phys.AABB aabb) intgetMaxX()intgetMaxY()intgetMaxZ()intgetMinX()intgetMinY()intgetMinZ()voidgrow(int s) voidgrow(int x, int y, int z) inthashCode()intersect(ImmutableBox other) voidintersectAssign(ImmutableBox other) booleanintersects(int minX, int minY, int minZ, int maxX, int maxY, int maxZ) voidmirrorAbout(net.minecraft.core.Direction.Axis axis) voidGrow this bounding box to have power of 2 side lengths, scaling from the minimum coords.voidGrow this bounding box to have power of 2 side length, scaling from the center.static GridAlignedBBofRadius(int radius) booleansameAs(ImmutableBox other) booleansameAs(net.minecraft.world.phys.AABB other) setMax(int x, int y, int z) setMax(net.minecraft.core.Vec3i v) setMaxX(int maxX) setMaxY(int maxY) setMaxZ(int maxZ) setMin(int x, int y, int z) setMin(net.minecraft.core.Vec3i v) setMinX(int minX) setMinY(int minY) setMinZ(int minZ) intsizeX()intsizeY()intsizeZ()net.minecraft.world.phys.AABBtoAABB()toString()voidtranslate(int x, int y, int z) voidtranslate(net.minecraft.core.Vec3i by) union(ImmutableBox other) voidunionAssign(ImmutableBox other) voidunionAssign(net.minecraft.world.phys.AABB other) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.jozufozu.flywheel.util.box.ImmutableBox
contains, hasPowerOf2Sides, intersects, isContainedBy, sameAs, volume
-
Constructor Details
-
GridAlignedBB
public GridAlignedBB() -
GridAlignedBB
public GridAlignedBB(int minX, int minY, int minZ, int maxX, int maxY, int maxZ)
-
-
Method Details
-
ofRadius
-
from
-
from
-
from
public static GridAlignedBB from(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end) -
from
-
from
-
containingAll
-
fixMinMax
public void fixMinMax() -
translate
public void translate(net.minecraft.core.Vec3i by) -
translate
public void translate(int x, int y, int z) -
mirrorAbout
public void mirrorAbout(net.minecraft.core.Direction.Axis axis) -
nextPowerOf2Centered
public void nextPowerOf2Centered()Grow this bounding box to have power of 2 side length, scaling from the center. -
nextPowerOf2
public void nextPowerOf2()Grow this bounding box to have power of 2 side lengths, scaling from the minimum coords. -
grow
public void grow(int s) -
grow
public void grow(int x, int y, int z) -
intersectAssign
-
unionAssign
-
unionAssign
public void unionAssign(net.minecraft.world.phys.AABB other) -
assign
public void assign(net.minecraft.world.phys.AABB other) -
assign
-
equals
-
hashCode
public int hashCode() -
getMinX
public int getMinX()- Specified by:
getMinXin interfaceImmutableBox
-
getMinY
public int getMinY()- Specified by:
getMinYin interfaceImmutableBox
-
getMinZ
public int getMinZ()- Specified by:
getMinZin interfaceImmutableBox
-
getMaxX
public int getMaxX()- Specified by:
getMaxXin interfaceImmutableBox
-
getMaxY
public int getMaxY()- Specified by:
getMaxYin interfaceImmutableBox
-
getMaxZ
public int getMaxZ()- Specified by:
getMaxZin interfaceImmutableBox
-
setMinX
-
setMinY
-
setMinZ
-
setMaxX
-
setMaxY
-
setMaxZ
-
assign
-
setMax
-
setMin
-
setMax
-
setMin
-
sizeX
public int sizeX()- Specified by:
sizeXin interfaceImmutableBox
-
sizeY
public int sizeY()- Specified by:
sizeYin interfaceImmutableBox
-
sizeZ
public int sizeZ()- Specified by:
sizeZin interfaceImmutableBox
-
empty
public boolean empty()- Specified by:
emptyin interfaceImmutableBox
-
sameAs
- Specified by:
sameAsin interfaceImmutableBox
-
sameAs
public boolean sameAs(net.minecraft.world.phys.AABB other) - Specified by:
sameAsin interfaceImmutableBox
-
intersect
- Specified by:
intersectin interfaceImmutableBox
-
union
- Specified by:
unionin interfaceImmutableBox
-
contains
- Specified by:
containsin interfaceImmutableBox
-
intersects
public boolean intersects(int minX, int minY, int minZ, int maxX, int maxY, int maxZ) - Specified by:
intersectsin interfaceImmutableBox
-
forEachContained
- Specified by:
forEachContainedin interfaceImmutableBox
-
toAABB
public net.minecraft.world.phys.AABB toAABB()- Specified by:
toAABBin interfaceImmutableBox
-
copy
- Specified by:
copyin interfaceImmutableBox
-
toString
-