13 avr. 2014, 00:40
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
{
TileEntity te = world.getBlockTileEntity(x, y, z);
if(te instanceof TileEntitySculpture)
{
int direction = ((TileEntitySculpture)te).getDirection();
if(direction == 0)
{
// direction 0
return AxisAlignedBB.getAABBPool().getAABB((double)x + 0.1D, (double)y + this.minY, (double)z + 0.2D, (double)x + this.maxX, (double)y + 0.9D, (double)z + 0.8D);
}
else if(direction == 1)
{
//direction 1
//etc … jusqu'à 3
}
}
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);
// tile entity invalide, pas de direction, donc valeur par défaut (ne devrait pas arriver en temps normal)
}

Même principe pour getSelectedBoundingBoxFromPool.