Class AABBUtils
java.lang.Object
com.portingdeadmods.portingdeadlibs.utils.AABBUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.phys.AABBcreate(double left, double right, double down, double up, double front, double back, double x, double y, double z) Creates an AABB starting from a point, then inflates it by the given amounts in every direction.static net.minecraft.world.phys.AABBcreate(double left, double right, double down, double up, double front, double back, net.minecraft.core.BlockPos pos) Creates an AABB starting from a 1x1x1 cube at the given position, then inflates it by the given amounts in every direction.static UniqueArray<net.minecraft.core.BlockPos> getAllPositionsInAABB(net.minecraft.world.phys.AABB aabb) Returns a UniqueArray of all full blocks occupied by the given AABB.static net.minecraft.world.phys.AABBmove(net.minecraft.world.phys.AABB aabb, net.minecraft.core.Direction direction, double distance) Moves the given AABB in the specified direction by the specified distance.
-
Constructor Details
-
AABBUtils
public AABBUtils()
-
-
Method Details
-
move
public static net.minecraft.world.phys.AABB move(net.minecraft.world.phys.AABB aabb, net.minecraft.core.Direction direction, double distance) Moves the given AABB in the specified direction by the specified distance.- Parameters:
aabb- The AABB to move.direction- TheDirectionto move the AABB in.distance- The distance to move the AABB.- Returns:
- The moved AABB.
-
create
public static net.minecraft.world.phys.AABB create(double left, double right, double down, double up, double front, double back, double x, double y, double z) Creates an AABB starting from a point, then inflates it by the given amounts in every direction.- Parameters:
left- The amount to inflate the AABB to the left.right- The amount to inflate the AABB to the right.down- The amount to inflate the AABB downwards.up- The amount to inflate the AABB upwards.front- The amount to inflate the AABB towards the front.back- The amount to inflate the AABB towards the back.x- The x position to create the AABB at.y- The y position to create the AABB at.z- The z position to create the AABB at.- Returns:
- The resulting AABB
-
create
public static net.minecraft.world.phys.AABB create(double left, double right, double down, double up, double front, double back, net.minecraft.core.BlockPos pos) Creates an AABB starting from a 1x1x1 cube at the given position, then inflates it by the given amounts in every direction.- Parameters:
left- The amount to inflate the AABB to the left.right- The amount to inflate the AABB to the right.down- The amount to inflate the AABB downwards.up- The amount to inflate the AABB upwards.front- The amount to inflate the AABB towards the front.back- The amount to inflate the AABB towards the back.pos- The position to create the AABB at.- Returns:
- The resulting AABB
-
getAllPositionsInAABB
public static UniqueArray<net.minecraft.core.BlockPos> getAllPositionsInAABB(net.minecraft.world.phys.AABB aabb) Returns a UniqueArray of all full blocks occupied by the given AABB.- Parameters:
aabb- The AABB to get the positions from.- Returns:
- A UniqueArray of BlockPos representing all full blocks within the AABB.
-