From 6d1b2216464d4dad449ac6fcfec476832224a55e Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Fri, 24 May 2024 19:50:35 +0100 Subject: Merge addon sources --- .../gtPlusPlus/api/objects/minecraft/AABB.java | 67 ---------------------- 1 file changed, 67 deletions(-) delete mode 100644 gtpp/src/main/java/gtPlusPlus/api/objects/minecraft/AABB.java (limited to 'gtpp/src/main/java/gtPlusPlus/api/objects/minecraft/AABB.java') diff --git a/gtpp/src/main/java/gtPlusPlus/api/objects/minecraft/AABB.java b/gtpp/src/main/java/gtPlusPlus/api/objects/minecraft/AABB.java deleted file mode 100644 index e516f12ddd..0000000000 --- a/gtpp/src/main/java/gtPlusPlus/api/objects/minecraft/AABB.java +++ /dev/null @@ -1,67 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import net.minecraft.entity.Entity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; - -import gtPlusPlus.core.util.minecraft.EntityUtils; - -/** - * Generates an AABB around an entity. - * - * @author Alkalus - * - */ -public class AABB { - - private final AxisAlignedBB mAabb; - private final World mWorld; - - /** - * Creates a AxisAlignedBB based around an Entity. - * - * @param aEntity - The Entity to work with. - * @param x - Maximum X from origin. - * @param y - Maximum Y from origin. - * @param z - Maximum Z from origin. - */ - public AABB(Entity aEntity, int x, int y, int z) { - if (aEntity == null) { - mAabb = null; - mWorld = null; - } else { - mWorld = aEntity.worldObj; - BlockPos aEntityLocation = EntityUtils.findBlockPosUnderEntity(aEntity); - int xMin, xMax, yMin, yMax, zMin, zMax; - xMin = aEntityLocation.xPos; - yMin = aEntityLocation.yPos; - zMin = aEntityLocation.zPos; - xMax = aEntityLocation.xPos + x; - yMax = aEntityLocation.yPos + y; - zMax = aEntityLocation.zPos + z; - mAabb = AxisAlignedBB.getBoundingBox(xMin, yMin, zMin, xMax, yMax, zMax); - } - } - - /** - * Used to get the AxisAlignedBB from this class. - * - * @return - */ - public AxisAlignedBB get() { - return mAabb; - } - - /** - * Used to determine if this object is valid or not. - * - * @return - */ - public boolean valid() { - return mAabb != null && mWorld != null; - } - - public World world() { - return mWorld; - } -} -- cgit