Skip to content

Commit

Permalink
Changing getAABBPool().getAABB( -> getBoundingBox(
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Behrhof committed Jun 8, 2014
1 parent d9cf30f commit 1278298
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 29 deletions.
9 changes: 6 additions & 3 deletions src/main/java/tconstruct/TConstruct.java
Expand Up @@ -71,18 +71,21 @@ public class TConstruct

public static final int liquidUpdateAmount = 6;

// the entire mod
public static final String modID = "TConstruct";

// Shared mod logger
public static final Logger logger = LogManager.getLogger("TConstruct");
public static final Logger logger = LogManager.getLogger(modID);

/* Instance of this mod, used for grabbing prototype fields */
@Instance("TConstruct")
@Instance(modID)
public static TConstruct instance;
/* Proxies for sides, used for graphics processing */
@SidedProxy(clientSide = "tconstruct.client.TProxyClient", serverSide = "tconstruct.common.TProxyCommon")
public static TProxyCommon proxy;

// Module loader
public static final ModuleController moduleLoader = new ModuleController("TDynstruct.cfg", "TConstruct");
public static final ModuleController moduleLoader = new ModuleController("TDynstruct.cfg", modID);

// The packet pipeline
public static final PacketPipeline packetPipeline = new PacketPipeline();
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/tconstruct/blocks/BlockLandmine.java
Expand Up @@ -532,7 +532,7 @@ protected int getMineState (World par1World, int par2, int par3, int par4)
protected AxisAlignedBB getSensitiveAABB (World par1World, int par2, int par3, int par4)
{
float f = 0.125F;
// return AxisAlignedBB.getAABBPool().getAABB((double)((float)par1 + f),
// return AxisAlignedBB.getBoundingBox((double)((float)par1 + f),
// (double)par2, (double)((float)par3 + f), (double)((float)(par1 + 1) -
// f), (double)par2 + 0.25D, (double)((float)(par3 + 1) - f));

Expand All @@ -559,7 +559,7 @@ protected AxisAlignedBB getSensitiveAABB (World par1World, int par2, int par3, i
maxY = par3 + 1;
maxZ = par4 + 1;
}
return AxisAlignedBB.getAABBPool().getAABB(minX, minY, minZ, maxX, maxY, maxZ);
return AxisAlignedBB.getBoundingBox(minX, minY, minZ, maxX, maxY, maxZ);
}

public Entity getMineTriggerer (World par1World, int par2, int par3, int par4)
Expand Down Expand Up @@ -597,17 +597,17 @@ public Entity getMineTriggerer (World par1World, int par2, int par3, int par4)

if (triggerType == Sensitivity.everything)
{
list = par1World.getEntitiesWithinAABBExcludingEntity((Entity) null, AxisAlignedBB.getAABBPool().getAABB(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D));
list = par1World.getEntitiesWithinAABBExcludingEntity((Entity) null, AxisAlignedBB.getBoundingBox(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D));
}

if (triggerType == Sensitivity.mobs)
{
list = par1World.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getAABBPool().getAABB(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D));
list = par1World.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D));
}

if (triggerType == Sensitivity.players)
{
list = par1World.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getAABBPool().getAABB(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D));
list = par1World.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D));
}

if (list != null && !list.isEmpty())
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/CraftingSlab.java
Expand Up @@ -77,9 +77,9 @@ public AxisAlignedBB getSelectedBoundingBoxFromPool (World world, int x, int y,
{
int metadata = world.getBlockMetadata(x, y, z);
if (metadata == 5)
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY - 0.125,
return AxisAlignedBB.getBoundingBox((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY - 0.125,
(double) z + this.maxZ);
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ);
return AxisAlignedBB.getBoundingBox((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ);
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/tconstruct/blocks/DryingRack.java
Expand Up @@ -159,7 +159,7 @@ public AxisAlignedBB getSelectedBoundingBoxFromPool (World world, int x, int y,
yMin = 0.75F;
break;
}
return AxisAlignedBB.getAABBPool().getAABB((double) x + xMin, (double) y + yMin, (double) z + zMin, (double) x + xMax, (double) y + yMax, (double) z + zMax);
return AxisAlignedBB.getBoundingBox((double) x + xMin, (double) y + yMin, (double) z + zMin, (double) x + xMax, (double) y + yMax, (double) z + zMax);
}

@Override
Expand Down Expand Up @@ -296,7 +296,7 @@ public TileEntity createTileEntity (World world, int metadata)
/*
* @Override public AxisAlignedBB getCollisionBoundingBoxFromPool (World
* world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z);
* if (meta != 1) { return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x +
* if (meta != 1) { return AxisAlignedBB.getBoundingBox(x, y, z, x +
* 1, y + 1, z + 1); } else { FaucetLogic logic = (FaucetLogic)
* world.getBlockTileEntity(x, y, z); if (logic != null) { float xMin =
* 0.25F; float xMax = 0.75F; float zMin = 0.25F; float zMax = 0.75F;
Expand All @@ -305,7 +305,7 @@ public TileEntity createTileEntity (World world, int metadata)
* break; case 3: zMax = 0.375F; zMin = 0F; break; case 4: xMin = 0.625F;
* xMax = 1.0F; break; case 5: xMax = 0.375F; xMin = 0F; break; }
*
* return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + xMin),
* return AxisAlignedBB.getBoundingBox((double) ((float) x + xMin),
* (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x +
* xMax), (double) y + 0.625, (double) ((float) z + zMax)); } }
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/GlassBlockConnected.java
Expand Up @@ -618,7 +618,7 @@ public AxisAlignedBB getSelectedBoundingBoxFromPool (World par1World, int par2,
}
else
{
return AxisAlignedBB.getAABBPool().getAABB(0D, 0D, 0D, 0D, 0D, 0D);
return AxisAlignedBB.getBoundingBox(0D, 0D, 0D, 0D, 0D, 0D);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/SearedBlock.java
Expand Up @@ -316,7 +316,7 @@ public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y,
int meta = world.getBlockMetadata(x, y, z);
if (meta != 1)
{
return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x + 1, y + 1, z + 1);
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
}
else
{
Expand Down Expand Up @@ -348,7 +348,7 @@ public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y,
break;
}

return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + xMin), (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x + xMax), (double) y + 0.625,
return AxisAlignedBB.getBoundingBox((double) ((float) x + xMin), (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x + xMax), (double) y + 0.625,
(double) ((float) z + zMax));
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/ToolStationBlock.java
Expand Up @@ -116,9 +116,9 @@ public AxisAlignedBB getSelectedBoundingBoxFromPool (World world, int x, int y,
{
int metadata = world.getBlockMetadata(x, y, z);
if (metadata == 5)
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY - 0.125,
return AxisAlignedBB.getBoundingBox((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY - 0.125,
(double) z + this.maxZ);
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ);
return AxisAlignedBB.getBoundingBox((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/logic/DryingRackLogic.java
Expand Up @@ -122,7 +122,7 @@ public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
@SideOnly(Side.CLIENT)
public AxisAlignedBB getRenderBoundingBox ()
{
AxisAlignedBB cbb = AxisAlignedBB.getAABBPool().getAABB(xCoord, yCoord - 1, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
AxisAlignedBB cbb = AxisAlignedBB.getBoundingBox(xCoord, yCoord - 1, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
return cbb;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/logic/SmelteryLogic.java
Expand Up @@ -308,7 +308,7 @@ public void updateEntity ()

void detectEntities ()
{
AxisAlignedBB box = AxisAlignedBB.getAABBPool().getAABB(centerPos.x, centerPos.y, centerPos.z, centerPos.x + 1.0D, centerPos.y + 1.0D, centerPos.z + 1.0D).expand(1.0D, 0.0D, 1.0D);
AxisAlignedBB box = AxisAlignedBB.getBoundingBox(centerPos.x, centerPos.y, centerPos.z, centerPos.x + 1.0D, centerPos.y + 1.0D, centerPos.z + 1.0D).expand(1.0D, 0.0D, 1.0D);

List list = worldObj.getEntitiesWithinAABB(Entity.class, box);
for (Object o : list)
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/tconstruct/blocks/traps/Landmine.java
Expand Up @@ -184,22 +184,22 @@ private void setStateIfMobInteractsWithPlate (World world, int posX, int posY, i
{
var8 = world.getEntitiesWithinAABBExcludingEntity(
(Entity) null,
AxisAlignedBB.getAABBPool().getAABB((double) ((float) posX + var7), (double) posY, (double) ((float) posZ + var7), (double) ((float) (posX + 1) - var7), (double) posY + 0.25D,
AxisAlignedBB.getBoundingBox((double) ((float) posX + var7), (double) posY, (double) ((float) posZ + var7), (double) ((float) (posX + 1) - var7), (double) posY + 0.25D,
(double) ((float) (posZ + 1) - var7)));
}

if (this.triggerMobType == EnumCreatureType.monster)
{
var8 = world.getEntitiesWithinAABB(
EntityLiving.class,
AxisAlignedBB.getAABBPool().getAABB((double) ((float) posX + var7), (double) posY, (double) ((float) posZ + var7), (double) ((float) (posX + 1) - var7), (double) posY + 0.25D,
AxisAlignedBB.getBoundingBox((double) ((float) posX + var7), (double) posY, (double) ((float) posZ + var7), (double) ((float) (posX + 1) - var7), (double) posY + 0.25D,
(double) ((float) (posZ + 1) - var7)));
}

/*
* if (this.triggerMobType == EnumCreatureType.players) { var8 =
* world.getEntitiesWithinAABB( EntityPlayer.class,
* AxisAlignedBB.getAABBPool().getAABB((double) ((float) posX + var7),
* AxisAlignedBB.getBoundingBox((double) ((float) posX + var7),
* (double) posY, (double) ((float) posZ + var7), (double) ((float)
* (posX + 1) - var7), (double) posY + 0.25D, (double) ((float) (posZ +
* 1) - var7))); }
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/tconstruct/common/TRepo.java
@@ -1,5 +1,6 @@
package tconstruct.common;

import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
import net.minecraft.block.Block;
import net.minecraft.block.Block.SoundType;
import net.minecraft.block.material.Material;
Expand All @@ -15,7 +16,9 @@
import tconstruct.modifiers.tools.ModAttack;
import tconstruct.modifiers.tools.ModFlux;
import tconstruct.modifiers.tools.ModLapis;
import tconstruct.TConstruct;

@ObjectHolder(TConstruct.modID)
public class TRepo
{
// Supresses console spam when iguana's tweaks remove stuff
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/entity/BlueSlime.java
Expand Up @@ -442,7 +442,7 @@ protected void dropFewItems (boolean par1, int par2)

for (int l = 0; l < k; ++l)
{
this.entityDropItem(new ItemStack(j), 1);
this.dropItem(j, 0);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/items/tools/Scythe.java
Expand Up @@ -252,7 +252,7 @@ public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPl
@Override
public boolean onLeftClickEntity (ItemStack stack, EntityPlayer player, Entity entity)
{
AxisAlignedBB box = AxisAlignedBB.getAABBPool().getAABB(entity.posX, entity.posY, entity.posZ, entity.posX + 1.0D, entity.posY + 1.0D, entity.posZ + 1.0D).expand(1.0D, 1.0D, 1.0D);
AxisAlignedBB box = AxisAlignedBB.getBoundingBox(entity.posX, entity.posY, entity.posZ, entity.posX + 1.0D, entity.posY + 1.0D, entity.posZ + 1.0D).expand(1.0D, 1.0D, 1.0D);
List list = player.worldObj.getEntitiesWithinAABBExcludingEntity(player, box);
for (Object o : list)
{
Expand Down
Expand Up @@ -26,7 +26,7 @@ protected ItemStack dispenseStack (IBlockSource par1IBlockSource, ItemStack par2
int i = par1IBlockSource.getXInt() + enumfacing.getFrontOffsetX();
int j = par1IBlockSource.getYInt() + enumfacing.getFrontOffsetY();
int k = par1IBlockSource.getZInt() + enumfacing.getFrontOffsetZ();
AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) i, (double) j, (double) k, (double) (i + 1), (double) (j + 1), (double) (k + 1));
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) i, (double) j, (double) k, (double) (i + 1), (double) (j + 1), (double) (k + 1));
List list = par1IBlockSource.getWorld().selectEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb, new IEntitySelector.ArmoredMob(par2ItemStack));

if (list.size() > 0)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/library/tools/AbilityHelper.java
Expand Up @@ -309,7 +309,7 @@ static void alertPlayerWolves (EntityPlayer player, EntityLivingBase living, boo
if (!(living instanceof EntityPlayer) || player.canAttackPlayer((EntityPlayer) living))
{
List var6 = player.worldObj.getEntitiesWithinAABB(EntityWolf.class,
AxisAlignedBB.getAABBPool().getAABB(player.posX, player.posY, player.posZ, player.posX + 1.0D, player.posY + 1.0D, player.posZ + 1.0D).expand(16.0D, 4.0D, 16.0D));
AxisAlignedBB.getBoundingBox(player.posX, player.posY, player.posZ, player.posX + 1.0D, player.posY + 1.0D, player.posZ + 1.0D).expand(16.0D, 4.0D, 16.0D));
Iterator var4 = var6.iterator();

while (var4.hasNext())
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/util/MiningExplosion.java
Expand Up @@ -103,7 +103,7 @@ public void doExplosionA ()
int l1 = MathHelper.floor_double(this.explosionY + (double) this.explosionSize + 1.0D);
int i2 = MathHelper.floor_double(this.explosionZ - (double) this.explosionSize - 1.0D);
int j2 = MathHelper.floor_double(this.explosionZ + (double) this.explosionSize + 1.0D);
List list = this.world.getEntitiesWithinAABBExcludingEntity(this.exploder, AxisAlignedBB.getAABBPool().getAABB((double) i, (double) k, (double) i2, (double) j, (double) l1, (double) j2));
List list = this.world.getEntitiesWithinAABBExcludingEntity(this.exploder, AxisAlignedBB.getBoundingBox((double) i, (double) k, (double) i2, (double) j, (double) l1, (double) j2));
Vec3 vec3 = this.world.getWorldVec3Pool().getVecFromPool(this.explosionX, this.explosionY, this.explosionZ);

for (int k2 = 0; k2 < list.size(); ++k2)
Expand Down
Expand Up @@ -31,7 +31,7 @@ public void executeLogic (World par1World, int par2, int par3, int par4, ItemSta
{
Random rand = ItemBlockLandmine.getRandom();

List<IShearable> sheeps = par1World.getEntitiesWithinAABB(IShearable.class, AxisAlignedBB.getAABBPool().getAABB(par2 - 2, par3 - 2, par4 - 2, par2 + 2, par3 + 2, par4 + 2));
List<IShearable> sheeps = par1World.getEntitiesWithinAABB(IShearable.class, AxisAlignedBB.getBoundingBox(par2 - 2, par3 - 2, par4 - 2, par2 + 2, par3 + 2, par4 + 2));

if (sheeps != null && !sheeps.isEmpty())
{
Expand Down

0 comments on commit 1278298

Please sign in to comment.