From 1ab7f7c1102214a67c879dfd7b401d1c3eec57c0 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Wed, 4 Jun 2014 22:59:56 -0500 Subject: [PATCH] Ditch AABBPool --- block/misc/BlockCharger.java | 2 +- block/misc/BlockQuartzTorch.java | 2 +- block/misc/BlockTinyTNT.java | 2 +- block/networking/BlockWireless.java | 4 ++-- block/qnb/BlockQuantumLinkChamber.java | 2 +- block/qnb/BlockQuantumRing.java | 2 +- block/spatial/BlockMatrixFrame.java | 2 +- block/storage/BlockSkyChest.java | 2 +- items/tools/powered/ToolMassCannon.java | 4 +--- tile/grindstone/TileCrank.java | 2 +- tile/networking/TileCableBus.java | 2 +- util/Platform.java | 3 +-- 12 files changed, 13 insertions(+), 16 deletions(-) diff --git a/block/misc/BlockCharger.java b/block/misc/BlockCharger.java index bb9a93ea..db075b5f 100644 --- a/block/misc/BlockCharger.java +++ b/block/misc/BlockCharger.java @@ -156,6 +156,6 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision @Override public void addCollidingBlockToList(World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e) { - out.add( AxisAlignedBB.getAABBPool().getAABB( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) ); + out.add( AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) ); } } diff --git a/block/misc/BlockQuartzTorch.java b/block/misc/BlockQuartzTorch.java index 96212909..920a39e1 100644 --- a/block/misc/BlockQuartzTorch.java +++ b/block/misc/BlockQuartzTorch.java @@ -100,7 +100,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I public void addCollidingBlockToList(World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e) {/* * double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 * - * getUp().offsetZ; out.add( AxisAlignedBB.getAABBPool().getAABB( xOff + (double) x + 0.15, yOff + (double) y + + * getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + * 0.15, zOff + (double) z + 0.15,// ahh xOff + (double) x + 0.85, yOff + (double) y + 0.85, zOff + (double) z + * 0.85 ) ); */ diff --git a/block/misc/BlockTinyTNT.java b/block/misc/BlockTinyTNT.java index b51caa06..2eae7337 100644 --- a/block/misc/BlockTinyTNT.java +++ b/block/misc/BlockTinyTNT.java @@ -158,7 +158,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision @Override public void addCollidingBlockToList(World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e) { - out.add( AxisAlignedBB.getAABBPool().getAABB( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) ); + out.add( AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) ); } diff --git a/block/networking/BlockWireless.java b/block/networking/BlockWireless.java index d8bbbe5e..16abd7df 100644 --- a/block/networking/BlockWireless.java +++ b/block/networking/BlockWireless.java @@ -163,10 +163,10 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision break; } - out.add( AxisAlignedBB.getAABBPool().getAABB( minX, minY, minZ, maxX, maxY, maxZ ) ); + out.add( AxisAlignedBB.getBoundingBox( minX, minY, minZ, maxX, maxY, maxZ ) ); } else - out.add( AxisAlignedBB.getAABBPool().getAABB( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) ); + out.add( AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) ); } @Override diff --git a/block/qnb/BlockQuantumLinkChamber.java b/block/qnb/BlockQuantumLinkChamber.java index e6091066..91d1d8a8 100644 --- a/block/qnb/BlockQuantumLinkChamber.java +++ b/block/qnb/BlockQuantumLinkChamber.java @@ -94,7 +94,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli public void addCollidingBlockToList(World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e) { double OnePx = 2.0 / 16.0; - out.add( AxisAlignedBB.getAABBPool().getAABB( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) ); + out.add( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) ); } } diff --git a/block/qnb/BlockQuantumRing.java b/block/qnb/BlockQuantumRing.java index 4f1a49f4..6ac42b6a 100644 --- a/block/qnb/BlockQuantumRing.java +++ b/block/qnb/BlockQuantumRing.java @@ -72,7 +72,7 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision { OnePx = 1.0 / 16.0; } - out.add( AxisAlignedBB.getAABBPool().getAABB( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) ); + out.add( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) ); } } diff --git a/block/spatial/BlockMatrixFrame.java b/block/spatial/BlockMatrixFrame.java index 4c534c1d..c9e63dd2 100644 --- a/block/spatial/BlockMatrixFrame.java +++ b/block/spatial/BlockMatrixFrame.java @@ -64,7 +64,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision @Override public void addCollidingBlockToList(World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e) { - out.add( AxisAlignedBB.getAABBPool().getAABB( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) ); + out.add( AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) ); } } diff --git a/block/storage/BlockSkyChest.java b/block/storage/BlockSkyChest.java index 23f4fd18..a6f53ac9 100644 --- a/block/storage/BlockSkyChest.java +++ b/block/storage/BlockSkyChest.java @@ -118,7 +118,7 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision @Override public void addCollidingBlockToList(World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e) { - out.add( AxisAlignedBB.getAABBPool().getAABB( 0.05, 0.05, 0.05, 0.95, 0.95, 0.95 ) ); + out.add( AxisAlignedBB.getBoundingBox( 0.05, 0.05, 0.05, 0.95, 0.95, 0.95 ) ); } @Override diff --git a/items/tools/powered/ToolMassCannon.java b/items/tools/powered/ToolMassCannon.java index d2c06514..db96e7ec 100644 --- a/items/tools/powered/ToolMassCannon.java +++ b/items/tools/powered/ToolMassCannon.java @@ -138,9 +138,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell Vec3 vec31 = vec3.addVector( (double) f7 * d3, (double) f6 * d3, (double) f8 * d3 ); - AxisAlignedBB bb = AxisAlignedBB - .getAABBPool() - .getAABB( Math.min( vec3.xCoord, vec31.xCoord ), Math.min( vec3.yCoord, vec31.yCoord ), + AxisAlignedBB bb = AxisAlignedBB.getBoundingBox( Math.min( vec3.xCoord, vec31.xCoord ), Math.min( vec3.yCoord, vec31.yCoord ), Math.min( vec3.zCoord, vec31.zCoord ), Math.max( vec3.xCoord, vec31.xCoord ), Math.max( vec3.yCoord, vec31.yCoord ), Math.max( vec3.zCoord, vec31.zCoord ) ).expand( 16, 16, 16 ); diff --git a/tile/grindstone/TileCrank.java b/tile/grindstone/TileCrank.java index 5b96b834..d5a896f5 100644 --- a/tile/grindstone/TileCrank.java +++ b/tile/grindstone/TileCrank.java @@ -131,7 +131,7 @@ public class TileCrank extends AEBaseTile implements ICustomCollision double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 * getUp().offsetZ; - out.add( AxisAlignedBB.getAABBPool().getAABB( xOff + (double) 0.15, yOff + (double) 0.15, zOff + (double) 0.15,// ahh + out.add( AxisAlignedBB.getBoundingBox( xOff + (double) 0.15, yOff + (double) 0.15, zOff + (double) 0.15,// ahh xOff + (double) 0.85, yOff + (double) 0.85, zOff + (double) 0.85 ) ); } diff --git a/tile/networking/TileCableBus.java b/tile/networking/TileCableBus.java index 4a230d4a..bd42a49f 100644 --- a/tile/networking/TileCableBus.java +++ b/tile/networking/TileCableBus.java @@ -224,7 +224,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl public void addCollidingBlockToList(World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e) { for (AxisAlignedBB bx : getSelectedBoundingBoxsFromPool( w, x, y, z, e, false )) - out.add( AxisAlignedBB.getAABBPool().getAABB( bx.minX, bx.minY, bx.minZ, bx.maxX, bx.maxY, bx.maxZ ) ); + out.add( AxisAlignedBB.getBoundingBox( bx.minX, bx.minY, bx.minZ, bx.maxX, bx.maxY, bx.maxZ ) ); } @Override diff --git a/util/Platform.java b/util/Platform.java index 06377493..8857301d 100644 --- a/util/Platform.java +++ b/util/Platform.java @@ -1234,8 +1234,7 @@ public class Platform Vec3 vec31 = vec3.addVector( (double) f7 * d3, (double) f6 * d3, (double) f8 * d3 ); AxisAlignedBB bb = AxisAlignedBB - .getAABBPool() - .getAABB( Math.min( vec3.xCoord, vec31.xCoord ), Math.min( vec3.yCoord, vec31.yCoord ), Math.min( vec3.zCoord, vec31.zCoord ), + .getBoundingBox( Math.min( vec3.xCoord, vec31.xCoord ), Math.min( vec3.yCoord, vec31.yCoord ), Math.min( vec3.zCoord, vec31.zCoord ), Math.max( vec3.xCoord, vec31.xCoord ), Math.max( vec3.yCoord, vec31.yCoord ), Math.max( vec3.zCoord, vec31.zCoord ) ) .expand( 16, 16, 16 );